`)
- .join("\n")
+ .join("\n"),
);
return html;
From 6bedad915e88e6d0d4c4cf38d91da1d59abc3618 Mon Sep 17 00:00:00 2001
From: Jane Chu <7559015+janechu@users.noreply.github.com>
Date: Mon, 20 Apr 2026 15:20:20 -0700
Subject: [PATCH 03/11] refactor: move bench package from packages/bench to
sites/benchmarks (#7459)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
# Pull Request
## 📖 Description
Moves the private `@microsoft/fast-bench` package from `packages/bench/` to `sites/benchmarks/` to better reflect its role as an internal site/tool rather than a publishable package. Also simplifies the root `package.json` workspaces by using glob patterns (`sites/*`, `examples/*`) instead of listing each workspace explicitly.
**Changes:**
- Move `packages/bench/` → `sites/benchmarks/` via `git mv`
- Update root `package.json` workspaces to use `sites/*` and `examples/*` globs
- Update `copilot-instructions.md` to reflect new location
- Update `README.md` folder path reference
- Regenerate `package-lock.json`
## 📑 Test Plan
- All existing tests pass — the bench package is private with no dependents
- `npm run checkchange` confirms no change files are needed (private package excluded from beachball scope)
- Workspace resolution verified via `npm ls`
## ✅ Checklist
### General
- [x] I have included a change request file using `$ npm run change`
- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.
---
.github/copilot-instructions.md | 2 +-
package-lock.json | 209 ++++--------------
package.json | 5 +-
.../bench => sites/benchmarks}/.gitignore | 0
.../bench => sites/benchmarks}/README.md | 2 +-
.../bench => sites/benchmarks}/package.json | 0
.../benchmarks}/server/package.json | 0
.../benchmarks}/server/server.mjs | 0
.../bench => sites/benchmarks}/src/bench.ts | 0
.../bench => sites/benchmarks}/src/chart.ts | 0
.../bench => sites/benchmarks}/src/report.ts | 0
.../src/scenarios/all/csr/index.html | 0
.../benchmarks}/src/scenarios/all/csr/main.ts | 0
.../benchmarks}/src/scenarios/all/element.ts | 0
.../src/scenarios/all/hydration/index.html | 0
.../src/scenarios/all/hydration/main.ts | 0
.../src/scenarios/attr-reflect/csr/index.html | 0
.../src/scenarios/attr-reflect/csr/main.ts | 0
.../src/scenarios/attr-reflect/element.ts | 0
.../attr-reflect/hydration/index.html | 0
.../scenarios/attr-reflect/hydration/main.ts | 0
.../attr-reflect/hydration/render.ts | 0
.../src/scenarios/attr-reflect/template.html | 0
.../src/scenarios/basic/csr/index.html | 0
.../src/scenarios/basic/csr/main.ts | 0
.../src/scenarios/basic/element.ts | 0
.../src/scenarios/basic/hydration/index.html | 0
.../src/scenarios/basic/hydration/main.ts | 0
.../src/scenarios/basic/hydration/render.ts | 0
.../src/scenarios/basic/template.html | 0
.../src/scenarios/bind-event/csr/index.html | 0
.../src/scenarios/bind-event/csr/main.ts | 0
.../src/scenarios/bind-event/element.ts | 0
.../scenarios/bind-event/hydration/index.html | 0
.../scenarios/bind-event/hydration/main.ts | 0
.../scenarios/bind-event/hydration/render.ts | 0
.../src/scenarios/bind-event/template.html | 0
.../src/scenarios/dot-syntax/csr/index.html | 0
.../src/scenarios/dot-syntax/csr/main.ts | 0
.../src/scenarios/dot-syntax/element.ts | 0
.../scenarios/dot-syntax/hydration/index.html | 0
.../scenarios/dot-syntax/hydration/main.ts | 0
.../scenarios/dot-syntax/hydration/render.ts | 0
.../src/scenarios/dot-syntax/template.html | 0
.../benchmarks}/src/scenarios/harness.ts | 0
.../benchmarks}/src/scenarios/index.html | 0
.../src/scenarios/ref-slotted/csr/index.html | 0
.../src/scenarios/ref-slotted/csr/main.ts | 0
.../src/scenarios/ref-slotted/element.ts | 0
.../ref-slotted/hydration/index.html | 0
.../scenarios/ref-slotted/hydration/main.ts | 0
.../scenarios/ref-slotted/hydration/render.ts | 0
.../src/scenarios/ref-slotted/template.html | 0
.../src/scenarios/repeat/csr/index.html | 0
.../src/scenarios/repeat/csr/main.ts | 0
.../src/scenarios/repeat/element.ts | 0
.../src/scenarios/repeat/hydration/index.html | 0
.../src/scenarios/repeat/hydration/main.ts | 0
.../src/scenarios/repeat/hydration/render.ts | 0
.../src/scenarios/repeat/template.html | 0
.../benchmarks}/src/scenarios/report.css | 0
.../benchmarks}/src/scenarios/report.js | 0
.../benchmarks}/src/scenarios/tree.ts | 0
.../src/scenarios/when/csr/index.html | 0
.../src/scenarios/when/csr/main.ts | 0
.../benchmarks}/src/scenarios/when/element.ts | 0
.../src/scenarios/when/hydration/index.html | 0
.../src/scenarios/when/hydration/main.ts | 0
.../src/scenarios/when/hydration/render.ts | 0
.../src/scenarios/when/template.html | 0
.../bench => sites/benchmarks}/src/trace.ts | 0
.../bench => sites/benchmarks}/tsconfig.json | 0
.../bench => sites/benchmarks}/vite.config.ts | 0
73 files changed, 50 insertions(+), 168 deletions(-)
rename {packages/bench => sites/benchmarks}/.gitignore (100%)
rename {packages/bench => sites/benchmarks}/README.md (98%)
rename {packages/bench => sites/benchmarks}/package.json (100%)
rename {packages/bench => sites/benchmarks}/server/package.json (100%)
rename {packages/bench => sites/benchmarks}/server/server.mjs (100%)
rename {packages/bench => sites/benchmarks}/src/bench.ts (100%)
rename {packages/bench => sites/benchmarks}/src/chart.ts (100%)
rename {packages/bench => sites/benchmarks}/src/report.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/all/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/all/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/all/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/all/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/all/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/attr-reflect/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/basic/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/bind-event/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/dot-syntax/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/harness.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/ref-slotted/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/repeat/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/report.css (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/report.js (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/tree.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/csr/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/csr/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/element.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/hydration/index.html (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/hydration/main.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/hydration/render.ts (100%)
rename {packages/bench => sites/benchmarks}/src/scenarios/when/template.html (100%)
rename {packages/bench => sites/benchmarks}/src/trace.ts (100%)
rename {packages/bench => sites/benchmarks}/tsconfig.json (100%)
rename {packages/bench => sites/benchmarks}/vite.config.ts (100%)
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index f8a84e735df..dd1f5e1b04a 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -27,8 +27,8 @@ FAST (`@microsoft/fast`) is a Microsoft open-source monorepo for building W3C-st
| Package | Status | Purpose |
|---|---|---|
-| `@microsoft/fast-bench` | Private (not published as a package) | Benchmarking utilities |
| `sites/website` | Private (not published as a package) | Documentation website source |
+| `sites/benchmarks` | Private (not published as a package) | Benchmarking utilities |
| `@microsoft/fast-ssr` | Alpha (not actively maintained) | Server-side rendering utilities |
### Example projects
diff --git a/package-lock.json b/package-lock.json
index b24f9f73030..d5a5976c200 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,9 +11,8 @@
"workspaces": [
"build",
"packages/*",
- "sites/website",
- "examples/todo-app",
- "examples/ssr"
+ "sites/*",
+ "examples/*"
],
"devDependencies": {
"@ast-grep/cli": "0.37.0",
@@ -1415,9 +1414,9 @@
}
},
"node_modules/@github/catalyst": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@github/catalyst/-/catalyst-1.8.0.tgz",
- "integrity": "sha512-uLpi/D/mKfylYaFLfzNuloXNENi0AlcM0Z7hwYLH8Z030jBCr+ueMdX2xLxCzpMH/keYXKh0uPrHSMfcbxU6KA==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@github/catalyst/-/catalyst-1.8.1.tgz",
+ "integrity": "sha512-dnN4WWpbeuQvA17LvsGdlXEueJdBk9y+I+WO5pdNpoHNOXPsFcz3hJrq1iRmdsNgQOf4S8e83axtwIxvG62eWA==",
"dev": true,
"license": "MIT"
},
@@ -1555,7 +1554,7 @@
}
},
"node_modules/@microsoft/fast-bench": {
- "resolved": "packages/bench",
+ "resolved": "sites/benchmarks",
"link": true
},
"node_modules/@microsoft/fast-build": {
@@ -4595,9 +4594,9 @@
}
},
"node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -4678,9 +4677,9 @@
}
},
"node_modules/get-tsconfig": {
- "version": "4.13.7",
- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.7.tgz",
- "integrity": "sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q==",
+ "version": "4.14.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
+ "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4992,9 +4991,9 @@
}
},
"node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
+ "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
@@ -5470,12 +5469,6 @@
"node": ">=0.12.0"
}
},
- "node_modules/is-promise": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
- "license": "MIT"
- },
"node_modules/is-ssh": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz",
@@ -5576,9 +5569,9 @@
"license": "MIT"
},
"node_modules/jsonfile": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
- "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",
+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",
"license": "MIT",
"dependencies": {
"universalify": "^2.0.0"
@@ -5824,9 +5817,9 @@
}
},
"node_modules/liquidjs": {
- "version": "10.25.5",
- "resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.25.5.tgz",
- "integrity": "sha512-GKiKeZjJDdVoQAu+S9rzkYsYnYhcep5W3WwZXgb5f+yq484P/k9JqamBbGYu+LBEixcUAXZr2jogdAIjB3ki1w==",
+ "version": "10.25.6",
+ "resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.25.6.tgz",
+ "integrity": "sha512-h5ki5HS1PiL9/NmLw3iUcTF1jQswKJd8KLEXNrtSf8XHF0v3c5+d+8llz3N9I5IUdc5rsOuVLb9AVnqvqqscPg==",
"license": "MIT",
"dependencies": {
"commander": "^10.0.0"
@@ -6604,15 +6597,6 @@
"node": ">= 0.8"
}
},
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
"node_modules/onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
@@ -6879,6 +6863,20 @@
"node": ">=18"
}
},
+ "node_modules/playwright/node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
"node_modules/please-upgrade-node": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
@@ -6889,9 +6887,9 @@
}
},
"node_modules/postcss": {
- "version": "8.5.9",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz",
- "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==",
+ "version": "8.5.10",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz",
+ "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==",
"funding": [
{
"type": "opencollective",
@@ -7300,55 +7298,6 @@
"node": ">=16.0.0"
}
},
- "node_modules/router": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
- "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
- "license": "MIT",
- "dependencies": {
- "debug": "^4.4.0",
- "depd": "^2.0.0",
- "is-promise": "^4.0.0",
- "parseurl": "^1.3.3",
- "path-to-regexp": "^8.0.0"
- },
- "engines": {
- "node": ">= 18"
- }
- },
- "node_modules/router/node_modules/debug": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/router/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "license": "MIT"
- },
- "node_modules/router/node_modules/path-to-regexp": {
- "version": "8.4.2",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
- "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -8349,20 +8298,6 @@
}
}
},
- "node_modules/vite/node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -8548,12 +8483,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "license": "ISC"
- },
"node_modules/ws": {
"version": "8.20.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz",
@@ -8682,14 +8611,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "packages/bench": {
- "name": "@microsoft/fast-bench",
- "version": "0.0.0",
- "dependencies": {
- "@microsoft/fast-element": "*",
- "@microsoft/fast-html": "*"
- }
- },
"packages/fast-build": {
"name": "@microsoft/fast-build",
"version": "0.4.0",
@@ -8784,8 +8705,6 @@
},
"packages/fast-test-harness/node_modules/accepts": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
- "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
"license": "MIT",
"dependencies": {
"mime-types": "^3.0.0",
@@ -8797,8 +8716,6 @@
},
"packages/fast-test-harness/node_modules/body-parser": {
"version": "2.2.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
- "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
"license": "MIT",
"dependencies": {
"bytes": "^3.1.2",
@@ -8821,8 +8738,6 @@
},
"packages/fast-test-harness/node_modules/content-disposition": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
- "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
"license": "MIT",
"engines": {
"node": ">=18"
@@ -8834,8 +8749,6 @@
},
"packages/fast-test-harness/node_modules/cookie-signature": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
- "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
"license": "MIT",
"engines": {
"node": ">=6.6.0"
@@ -8843,8 +8756,6 @@
},
"packages/fast-test-harness/node_modules/debug": {
"version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -8860,8 +8771,6 @@
},
"packages/fast-test-harness/node_modules/express": {
"version": "5.2.1",
- "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
- "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
"license": "MIT",
"dependencies": {
"accepts": "^2.0.0",
@@ -8903,8 +8812,6 @@
},
"packages/fast-test-harness/node_modules/finalhandler": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
- "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
"license": "MIT",
"dependencies": {
"debug": "^4.4.0",
@@ -8924,8 +8831,6 @@
},
"packages/fast-test-harness/node_modules/fresh": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
@@ -8933,8 +8838,6 @@
},
"packages/fast-test-harness/node_modules/iconv-lite": {
"version": "0.7.2",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
- "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
@@ -8949,8 +8852,6 @@
},
"packages/fast-test-harness/node_modules/media-typer": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
@@ -8958,8 +8859,6 @@
},
"packages/fast-test-harness/node_modules/merge-descriptors": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
- "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
"license": "MIT",
"engines": {
"node": ">=18"
@@ -8970,8 +8869,6 @@
},
"packages/fast-test-harness/node_modules/mime-db": {
"version": "1.54.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
@@ -8979,8 +8876,6 @@
},
"packages/fast-test-harness/node_modules/mime-types": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
- "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
"license": "MIT",
"dependencies": {
"mime-db": "^1.54.0"
@@ -8995,14 +8890,10 @@
},
"packages/fast-test-harness/node_modules/ms": {
"version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"packages/fast-test-harness/node_modules/negotiator": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
- "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
@@ -9010,8 +8901,6 @@
},
"packages/fast-test-harness/node_modules/raw-body": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
- "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
"license": "MIT",
"dependencies": {
"bytes": "~3.1.2",
@@ -9025,8 +8914,6 @@
},
"packages/fast-test-harness/node_modules/send": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
- "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
"license": "MIT",
"dependencies": {
"debug": "^4.4.3",
@@ -9051,8 +8938,6 @@
},
"packages/fast-test-harness/node_modules/serve-static": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
- "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
"license": "MIT",
"dependencies": {
"encodeurl": "^2.0.0",
@@ -9070,8 +8955,6 @@
},
"packages/fast-test-harness/node_modules/type-is": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
"license": "MIT",
"dependencies": {
"content-type": "^1.0.5",
@@ -9082,6 +8965,14 @@
"node": ">= 0.6"
}
},
+ "sites/benchmarks": {
+ "name": "@microsoft/fast-bench",
+ "version": "0.0.0",
+ "dependencies": {
+ "@microsoft/fast-element": "*",
+ "@microsoft/fast-html": "*"
+ }
+ },
"sites/website": {
"name": "@microsoft/fast-site",
"version": "0.6.2",
@@ -9114,8 +9005,6 @@
},
"sites/website/node_modules/@microsoft/api-extractor-model": {
"version": "7.33.4",
- "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.33.4.tgz",
- "integrity": "sha512-u1LTaNTikZAQ9uK6KG1Ms7nvNedsnODnspq/gH2dcyETWvH4hVNGNDvRAEutH66kAmxA4/necElqGNs1FggC8w==",
"license": "MIT",
"dependencies": {
"@microsoft/tsdoc": "~0.16.0",
@@ -9125,8 +9014,6 @@
},
"sites/website/node_modules/@rushstack/node-core-library": {
"version": "5.20.3",
- "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-5.20.3.tgz",
- "integrity": "sha512-95JgEPq2k7tHxhF9/OJnnyHDXfC9cLhhta0An/6MlkDsX2A6dTzDrTUG18vx4vjc280V0fi0xDH9iQczpSuWsw==",
"license": "MIT",
"dependencies": {
"ajv": "~8.18.0",
@@ -9149,8 +9036,6 @@
},
"sites/website/node_modules/@rushstack/terminal": {
"version": "0.22.3",
- "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.22.3.tgz",
- "integrity": "sha512-gHC9pIMrUPzAbBiI4VZMU7Q+rsCzb8hJl36lFIulIzoceKotyKL3Rd76AZ2CryCTKEg+0bnTj406HE5YY5OQvw==",
"license": "MIT",
"dependencies": {
"@rushstack/node-core-library": "5.20.3",
@@ -9168,8 +9053,6 @@
},
"sites/website/node_modules/@rushstack/ts-command-line": {
"version": "5.3.3",
- "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-5.3.3.tgz",
- "integrity": "sha512-c+ltdcvC7ym+10lhwR/vWiOhsrm/bP3By2VsFcs5qTKv+6tTmxgbVrtJ5NdNjANiV5TcmOZgUN+5KYQ4llsvEw==",
"license": "MIT",
"dependencies": {
"@rushstack/terminal": "0.22.3",
diff --git a/package.json b/package.json
index 80308cfcaee..c8c7e0bd438 100644
--- a/package.json
+++ b/package.json
@@ -11,9 +11,8 @@
"workspaces": [
"build",
"packages/*",
- "sites/website",
- "examples/todo-app",
- "examples/ssr"
+ "sites/*",
+ "examples/*"
],
"engines": {
"npm": ">=10.0.0",
diff --git a/packages/bench/.gitignore b/sites/benchmarks/.gitignore
similarity index 100%
rename from packages/bench/.gitignore
rename to sites/benchmarks/.gitignore
diff --git a/packages/bench/README.md b/sites/benchmarks/README.md
similarity index 98%
rename from packages/bench/README.md
rename to sites/benchmarks/README.md
index 251a11ffc58..d6c1be5111b 100644
--- a/packages/bench/README.md
+++ b/sites/benchmarks/README.md
@@ -14,7 +14,7 @@ npm install
## Running benchmarks
-From this folder (`packages/bench`):
+From this folder (`sites/benchmarks`):
```bash
npm run bench
diff --git a/packages/bench/package.json b/sites/benchmarks/package.json
similarity index 100%
rename from packages/bench/package.json
rename to sites/benchmarks/package.json
diff --git a/packages/bench/server/package.json b/sites/benchmarks/server/package.json
similarity index 100%
rename from packages/bench/server/package.json
rename to sites/benchmarks/server/package.json
diff --git a/packages/bench/server/server.mjs b/sites/benchmarks/server/server.mjs
similarity index 100%
rename from packages/bench/server/server.mjs
rename to sites/benchmarks/server/server.mjs
diff --git a/packages/bench/src/bench.ts b/sites/benchmarks/src/bench.ts
similarity index 100%
rename from packages/bench/src/bench.ts
rename to sites/benchmarks/src/bench.ts
diff --git a/packages/bench/src/chart.ts b/sites/benchmarks/src/chart.ts
similarity index 100%
rename from packages/bench/src/chart.ts
rename to sites/benchmarks/src/chart.ts
diff --git a/packages/bench/src/report.ts b/sites/benchmarks/src/report.ts
similarity index 100%
rename from packages/bench/src/report.ts
rename to sites/benchmarks/src/report.ts
diff --git a/packages/bench/src/scenarios/all/csr/index.html b/sites/benchmarks/src/scenarios/all/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/all/csr/index.html
rename to sites/benchmarks/src/scenarios/all/csr/index.html
diff --git a/packages/bench/src/scenarios/all/csr/main.ts b/sites/benchmarks/src/scenarios/all/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/all/csr/main.ts
rename to sites/benchmarks/src/scenarios/all/csr/main.ts
diff --git a/packages/bench/src/scenarios/all/element.ts b/sites/benchmarks/src/scenarios/all/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/all/element.ts
rename to sites/benchmarks/src/scenarios/all/element.ts
diff --git a/packages/bench/src/scenarios/all/hydration/index.html b/sites/benchmarks/src/scenarios/all/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/all/hydration/index.html
rename to sites/benchmarks/src/scenarios/all/hydration/index.html
diff --git a/packages/bench/src/scenarios/all/hydration/main.ts b/sites/benchmarks/src/scenarios/all/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/all/hydration/main.ts
rename to sites/benchmarks/src/scenarios/all/hydration/main.ts
diff --git a/packages/bench/src/scenarios/attr-reflect/csr/index.html b/sites/benchmarks/src/scenarios/attr-reflect/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/csr/index.html
rename to sites/benchmarks/src/scenarios/attr-reflect/csr/index.html
diff --git a/packages/bench/src/scenarios/attr-reflect/csr/main.ts b/sites/benchmarks/src/scenarios/attr-reflect/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/csr/main.ts
rename to sites/benchmarks/src/scenarios/attr-reflect/csr/main.ts
diff --git a/packages/bench/src/scenarios/attr-reflect/element.ts b/sites/benchmarks/src/scenarios/attr-reflect/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/element.ts
rename to sites/benchmarks/src/scenarios/attr-reflect/element.ts
diff --git a/packages/bench/src/scenarios/attr-reflect/hydration/index.html b/sites/benchmarks/src/scenarios/attr-reflect/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/hydration/index.html
rename to sites/benchmarks/src/scenarios/attr-reflect/hydration/index.html
diff --git a/packages/bench/src/scenarios/attr-reflect/hydration/main.ts b/sites/benchmarks/src/scenarios/attr-reflect/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/hydration/main.ts
rename to sites/benchmarks/src/scenarios/attr-reflect/hydration/main.ts
diff --git a/packages/bench/src/scenarios/attr-reflect/hydration/render.ts b/sites/benchmarks/src/scenarios/attr-reflect/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/hydration/render.ts
rename to sites/benchmarks/src/scenarios/attr-reflect/hydration/render.ts
diff --git a/packages/bench/src/scenarios/attr-reflect/template.html b/sites/benchmarks/src/scenarios/attr-reflect/template.html
similarity index 100%
rename from packages/bench/src/scenarios/attr-reflect/template.html
rename to sites/benchmarks/src/scenarios/attr-reflect/template.html
diff --git a/packages/bench/src/scenarios/basic/csr/index.html b/sites/benchmarks/src/scenarios/basic/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/basic/csr/index.html
rename to sites/benchmarks/src/scenarios/basic/csr/index.html
diff --git a/packages/bench/src/scenarios/basic/csr/main.ts b/sites/benchmarks/src/scenarios/basic/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/basic/csr/main.ts
rename to sites/benchmarks/src/scenarios/basic/csr/main.ts
diff --git a/packages/bench/src/scenarios/basic/element.ts b/sites/benchmarks/src/scenarios/basic/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/basic/element.ts
rename to sites/benchmarks/src/scenarios/basic/element.ts
diff --git a/packages/bench/src/scenarios/basic/hydration/index.html b/sites/benchmarks/src/scenarios/basic/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/basic/hydration/index.html
rename to sites/benchmarks/src/scenarios/basic/hydration/index.html
diff --git a/packages/bench/src/scenarios/basic/hydration/main.ts b/sites/benchmarks/src/scenarios/basic/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/basic/hydration/main.ts
rename to sites/benchmarks/src/scenarios/basic/hydration/main.ts
diff --git a/packages/bench/src/scenarios/basic/hydration/render.ts b/sites/benchmarks/src/scenarios/basic/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/basic/hydration/render.ts
rename to sites/benchmarks/src/scenarios/basic/hydration/render.ts
diff --git a/packages/bench/src/scenarios/basic/template.html b/sites/benchmarks/src/scenarios/basic/template.html
similarity index 100%
rename from packages/bench/src/scenarios/basic/template.html
rename to sites/benchmarks/src/scenarios/basic/template.html
diff --git a/packages/bench/src/scenarios/bind-event/csr/index.html b/sites/benchmarks/src/scenarios/bind-event/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/csr/index.html
rename to sites/benchmarks/src/scenarios/bind-event/csr/index.html
diff --git a/packages/bench/src/scenarios/bind-event/csr/main.ts b/sites/benchmarks/src/scenarios/bind-event/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/csr/main.ts
rename to sites/benchmarks/src/scenarios/bind-event/csr/main.ts
diff --git a/packages/bench/src/scenarios/bind-event/element.ts b/sites/benchmarks/src/scenarios/bind-event/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/element.ts
rename to sites/benchmarks/src/scenarios/bind-event/element.ts
diff --git a/packages/bench/src/scenarios/bind-event/hydration/index.html b/sites/benchmarks/src/scenarios/bind-event/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/hydration/index.html
rename to sites/benchmarks/src/scenarios/bind-event/hydration/index.html
diff --git a/packages/bench/src/scenarios/bind-event/hydration/main.ts b/sites/benchmarks/src/scenarios/bind-event/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/hydration/main.ts
rename to sites/benchmarks/src/scenarios/bind-event/hydration/main.ts
diff --git a/packages/bench/src/scenarios/bind-event/hydration/render.ts b/sites/benchmarks/src/scenarios/bind-event/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/hydration/render.ts
rename to sites/benchmarks/src/scenarios/bind-event/hydration/render.ts
diff --git a/packages/bench/src/scenarios/bind-event/template.html b/sites/benchmarks/src/scenarios/bind-event/template.html
similarity index 100%
rename from packages/bench/src/scenarios/bind-event/template.html
rename to sites/benchmarks/src/scenarios/bind-event/template.html
diff --git a/packages/bench/src/scenarios/dot-syntax/csr/index.html b/sites/benchmarks/src/scenarios/dot-syntax/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/csr/index.html
rename to sites/benchmarks/src/scenarios/dot-syntax/csr/index.html
diff --git a/packages/bench/src/scenarios/dot-syntax/csr/main.ts b/sites/benchmarks/src/scenarios/dot-syntax/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/csr/main.ts
rename to sites/benchmarks/src/scenarios/dot-syntax/csr/main.ts
diff --git a/packages/bench/src/scenarios/dot-syntax/element.ts b/sites/benchmarks/src/scenarios/dot-syntax/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/element.ts
rename to sites/benchmarks/src/scenarios/dot-syntax/element.ts
diff --git a/packages/bench/src/scenarios/dot-syntax/hydration/index.html b/sites/benchmarks/src/scenarios/dot-syntax/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/hydration/index.html
rename to sites/benchmarks/src/scenarios/dot-syntax/hydration/index.html
diff --git a/packages/bench/src/scenarios/dot-syntax/hydration/main.ts b/sites/benchmarks/src/scenarios/dot-syntax/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/hydration/main.ts
rename to sites/benchmarks/src/scenarios/dot-syntax/hydration/main.ts
diff --git a/packages/bench/src/scenarios/dot-syntax/hydration/render.ts b/sites/benchmarks/src/scenarios/dot-syntax/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/hydration/render.ts
rename to sites/benchmarks/src/scenarios/dot-syntax/hydration/render.ts
diff --git a/packages/bench/src/scenarios/dot-syntax/template.html b/sites/benchmarks/src/scenarios/dot-syntax/template.html
similarity index 100%
rename from packages/bench/src/scenarios/dot-syntax/template.html
rename to sites/benchmarks/src/scenarios/dot-syntax/template.html
diff --git a/packages/bench/src/scenarios/harness.ts b/sites/benchmarks/src/scenarios/harness.ts
similarity index 100%
rename from packages/bench/src/scenarios/harness.ts
rename to sites/benchmarks/src/scenarios/harness.ts
diff --git a/packages/bench/src/scenarios/index.html b/sites/benchmarks/src/scenarios/index.html
similarity index 100%
rename from packages/bench/src/scenarios/index.html
rename to sites/benchmarks/src/scenarios/index.html
diff --git a/packages/bench/src/scenarios/ref-slotted/csr/index.html b/sites/benchmarks/src/scenarios/ref-slotted/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/csr/index.html
rename to sites/benchmarks/src/scenarios/ref-slotted/csr/index.html
diff --git a/packages/bench/src/scenarios/ref-slotted/csr/main.ts b/sites/benchmarks/src/scenarios/ref-slotted/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/csr/main.ts
rename to sites/benchmarks/src/scenarios/ref-slotted/csr/main.ts
diff --git a/packages/bench/src/scenarios/ref-slotted/element.ts b/sites/benchmarks/src/scenarios/ref-slotted/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/element.ts
rename to sites/benchmarks/src/scenarios/ref-slotted/element.ts
diff --git a/packages/bench/src/scenarios/ref-slotted/hydration/index.html b/sites/benchmarks/src/scenarios/ref-slotted/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/hydration/index.html
rename to sites/benchmarks/src/scenarios/ref-slotted/hydration/index.html
diff --git a/packages/bench/src/scenarios/ref-slotted/hydration/main.ts b/sites/benchmarks/src/scenarios/ref-slotted/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/hydration/main.ts
rename to sites/benchmarks/src/scenarios/ref-slotted/hydration/main.ts
diff --git a/packages/bench/src/scenarios/ref-slotted/hydration/render.ts b/sites/benchmarks/src/scenarios/ref-slotted/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/hydration/render.ts
rename to sites/benchmarks/src/scenarios/ref-slotted/hydration/render.ts
diff --git a/packages/bench/src/scenarios/ref-slotted/template.html b/sites/benchmarks/src/scenarios/ref-slotted/template.html
similarity index 100%
rename from packages/bench/src/scenarios/ref-slotted/template.html
rename to sites/benchmarks/src/scenarios/ref-slotted/template.html
diff --git a/packages/bench/src/scenarios/repeat/csr/index.html b/sites/benchmarks/src/scenarios/repeat/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/repeat/csr/index.html
rename to sites/benchmarks/src/scenarios/repeat/csr/index.html
diff --git a/packages/bench/src/scenarios/repeat/csr/main.ts b/sites/benchmarks/src/scenarios/repeat/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/repeat/csr/main.ts
rename to sites/benchmarks/src/scenarios/repeat/csr/main.ts
diff --git a/packages/bench/src/scenarios/repeat/element.ts b/sites/benchmarks/src/scenarios/repeat/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/repeat/element.ts
rename to sites/benchmarks/src/scenarios/repeat/element.ts
diff --git a/packages/bench/src/scenarios/repeat/hydration/index.html b/sites/benchmarks/src/scenarios/repeat/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/repeat/hydration/index.html
rename to sites/benchmarks/src/scenarios/repeat/hydration/index.html
diff --git a/packages/bench/src/scenarios/repeat/hydration/main.ts b/sites/benchmarks/src/scenarios/repeat/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/repeat/hydration/main.ts
rename to sites/benchmarks/src/scenarios/repeat/hydration/main.ts
diff --git a/packages/bench/src/scenarios/repeat/hydration/render.ts b/sites/benchmarks/src/scenarios/repeat/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/repeat/hydration/render.ts
rename to sites/benchmarks/src/scenarios/repeat/hydration/render.ts
diff --git a/packages/bench/src/scenarios/repeat/template.html b/sites/benchmarks/src/scenarios/repeat/template.html
similarity index 100%
rename from packages/bench/src/scenarios/repeat/template.html
rename to sites/benchmarks/src/scenarios/repeat/template.html
diff --git a/packages/bench/src/scenarios/report.css b/sites/benchmarks/src/scenarios/report.css
similarity index 100%
rename from packages/bench/src/scenarios/report.css
rename to sites/benchmarks/src/scenarios/report.css
diff --git a/packages/bench/src/scenarios/report.js b/sites/benchmarks/src/scenarios/report.js
similarity index 100%
rename from packages/bench/src/scenarios/report.js
rename to sites/benchmarks/src/scenarios/report.js
diff --git a/packages/bench/src/scenarios/tree.ts b/sites/benchmarks/src/scenarios/tree.ts
similarity index 100%
rename from packages/bench/src/scenarios/tree.ts
rename to sites/benchmarks/src/scenarios/tree.ts
diff --git a/packages/bench/src/scenarios/when/csr/index.html b/sites/benchmarks/src/scenarios/when/csr/index.html
similarity index 100%
rename from packages/bench/src/scenarios/when/csr/index.html
rename to sites/benchmarks/src/scenarios/when/csr/index.html
diff --git a/packages/bench/src/scenarios/when/csr/main.ts b/sites/benchmarks/src/scenarios/when/csr/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/when/csr/main.ts
rename to sites/benchmarks/src/scenarios/when/csr/main.ts
diff --git a/packages/bench/src/scenarios/when/element.ts b/sites/benchmarks/src/scenarios/when/element.ts
similarity index 100%
rename from packages/bench/src/scenarios/when/element.ts
rename to sites/benchmarks/src/scenarios/when/element.ts
diff --git a/packages/bench/src/scenarios/when/hydration/index.html b/sites/benchmarks/src/scenarios/when/hydration/index.html
similarity index 100%
rename from packages/bench/src/scenarios/when/hydration/index.html
rename to sites/benchmarks/src/scenarios/when/hydration/index.html
diff --git a/packages/bench/src/scenarios/when/hydration/main.ts b/sites/benchmarks/src/scenarios/when/hydration/main.ts
similarity index 100%
rename from packages/bench/src/scenarios/when/hydration/main.ts
rename to sites/benchmarks/src/scenarios/when/hydration/main.ts
diff --git a/packages/bench/src/scenarios/when/hydration/render.ts b/sites/benchmarks/src/scenarios/when/hydration/render.ts
similarity index 100%
rename from packages/bench/src/scenarios/when/hydration/render.ts
rename to sites/benchmarks/src/scenarios/when/hydration/render.ts
diff --git a/packages/bench/src/scenarios/when/template.html b/sites/benchmarks/src/scenarios/when/template.html
similarity index 100%
rename from packages/bench/src/scenarios/when/template.html
rename to sites/benchmarks/src/scenarios/when/template.html
diff --git a/packages/bench/src/trace.ts b/sites/benchmarks/src/trace.ts
similarity index 100%
rename from packages/bench/src/trace.ts
rename to sites/benchmarks/src/trace.ts
diff --git a/packages/bench/tsconfig.json b/sites/benchmarks/tsconfig.json
similarity index 100%
rename from packages/bench/tsconfig.json
rename to sites/benchmarks/tsconfig.json
diff --git a/packages/bench/vite.config.ts b/sites/benchmarks/vite.config.ts
similarity index 100%
rename from packages/bench/vite.config.ts
rename to sites/benchmarks/vite.config.ts
From 0835f29e43a77390669025a1be051c3f025498ec Mon Sep 17 00:00:00 2001
From: Microsoft FAST Builds
Date: Tue, 21 Apr 2026 00:05:17 +0000
Subject: [PATCH 04/11] applying package updates
---
...html-ee5e1a5d-0ff4-46fe-96c9-ed982e93e391.json | 7 -------
packages/fast-html/CHANGELOG.json | 15 +++++++++++++++
2 files changed, 15 insertions(+), 7 deletions(-)
delete mode 100644 change/@microsoft-fast-html-ee5e1a5d-0ff4-46fe-96c9-ed982e93e391.json
diff --git a/change/@microsoft-fast-html-ee5e1a5d-0ff4-46fe-96c9-ed982e93e391.json b/change/@microsoft-fast-html-ee5e1a5d-0ff4-46fe-96c9-ed982e93e391.json
deleted file mode 100644
index 293e17774d4..00000000000
--- a/change/@microsoft-fast-html-ee5e1a5d-0ff4-46fe-96c9-ed982e93e391.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type": "none",
- "comment": "chore: update webui to 0.0.10",
- "packageName": "@microsoft/fast-html",
- "email": "7559015+janechu@users.noreply.github.com",
- "dependentChangeType": "none"
-}
diff --git a/packages/fast-html/CHANGELOG.json b/packages/fast-html/CHANGELOG.json
index b6ff6bcac02..d692f446219 100644
--- a/packages/fast-html/CHANGELOG.json
+++ b/packages/fast-html/CHANGELOG.json
@@ -1,6 +1,21 @@
{
"name": "@microsoft/fast-html",
"entries": [
+ {
+ "date": "Tue, 21 Apr 2026 00:05:17 GMT",
+ "version": "1.0.0-alpha.49",
+ "tag": "@microsoft/fast-html_v1.0.0-alpha.49",
+ "comments": {
+ "none": [
+ {
+ "author": "7559015+janechu@users.noreply.github.com",
+ "package": "@microsoft/fast-html",
+ "commit": "713e4f5274ce8561268e8348da21968be0350a99",
+ "comment": "chore: update webui to 0.0.10"
+ }
+ ]
+ }
+ },
{
"date": "Sat, 18 Apr 2026 00:05:00 GMT",
"version": "1.0.0-alpha.49",
From f28432a100e1ee2e2bcd0c6dcd6e61953f777854 Mon Sep 17 00:00:00 2001
From: Jane Chu <7559015+janechu@users.noreply.github.com>
Date: Mon, 20 Apr 2026 20:44:47 -0700
Subject: [PATCH 05/11] chore: remove @microsoft/fast-ssr (#7461)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
# Pull Request
## 📖 Description
As the `@microsoft/fast-element` package moves towards a declarative templating solution, the `@microsoft/fast-ssr` is being removed. We have posted and published a deprecation notice with a project that will fill this gap.
## 👩💻 Reviewer Notes
This is a simple removal.
## ✅ Checklist
### General
- [x] I have included a change request file using `$ npm run change`
- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.
---
.github/copilot-instructions.md | 2 -
...-30f1b1bf-454c-4952-a54c-7a0a5131b741.json | 7 +
examples/ssr/CHANGELOG.json | 20 -
examples/ssr/CHANGELOG.md | 13 -
examples/ssr/README.md | 7 -
examples/ssr/package.json | 30 -
examples/ssr/server.js | 63 -
examples/ssr/src/main.ts | 6 -
examples/ssr/todo-data.json | 14 -
examples/ssr/tsconfig.json | 22 -
examples/ssr/vite.config.ts | 15 -
package-lock.json | 48 -
packages/README.md | 7 -
packages/fast-html/RENDERING.md | 2 +-
packages/fast-ssr/.npmignore | 11 -
packages/fast-ssr/ACKNOWLEDGEMENTS.md | 41 -
packages/fast-ssr/CHANGELOG.json | 1476 -----------------
packages/fast-ssr/CHANGELOG.md | 381 -----
packages/fast-ssr/README.md | 374 -----
packages/fast-ssr/api-extractor.json | 10 -
packages/fast-ssr/biome.json | 4 -
packages/fast-ssr/docs/api-report.api.md | 196 ---
packages/fast-ssr/package.json | 75 -
packages/fast-ssr/playwright.config.ts | 18 -
packages/fast-ssr/scripts/run-tests.mjs | 8 -
packages/fast-ssr/server/README.md | 2 -
packages/fast-ssr/server/placeholder.png | Bin 1617 -> 0 bytes
packages/fast-ssr/server/server.ts | 89 -
packages/fast-ssr/server/tsconfig.json | 9 -
.../fast-ssr/src/configure-fast-element.ts | 34 -
.../src/declarative-shadow-dom-polyfill.ts | 38 -
packages/fast-ssr/src/dom-shim.spec.ts | 184 --
packages/fast-ssr/src/dom-shim.ts | 443 -----
packages/fast-ssr/src/element-controller.ts | 14 -
.../element-renderer/element-renderer.spec.ts | 551 ------
.../src/element-renderer/element-renderer.ts | 163 --
.../element-renderer/fast-element-renderer.ts | 336 ----
.../src/element-renderer/interfaces.ts | 70 -
packages/fast-ssr/src/escape-html.ts | 21 -
packages/fast-ssr/src/event-utilities.ts | 3 -
packages/fast-ssr/src/exports.spec.ts | 87 -
packages/fast-ssr/src/exports.ts | 207 ---
.../fast-command-buffer/index.fixture.html | 301 ----
.../fast-ssr/src/fast-command-buffer/index.ts | 149 --
packages/fast-ssr/src/install-dom-shim.ts | 3 -
packages/fast-ssr/src/render-info.spec.ts | 65 -
packages/fast-ssr/src/render-info.ts | 61 -
packages/fast-ssr/src/request-storage.spec.ts | 237 ---
packages/fast-ssr/src/request-storage.ts | 300 ----
.../fast-ssr/src/styles/fast-style-config.ts | 1 -
.../src/styles/fast-style.fixture.html | 416 -----
.../fast-ssr/src/styles/fast-style.pw.spec.ts | 78 -
packages/fast-ssr/src/styles/fast-style.ts | 81 -
.../src/styles/style-renderer.spec.ts | 74 -
.../fast-ssr/src/styles/style-renderer.ts | 73 -
.../fast-ssr/src/styles/style-strategy.ts | 35 -
.../src/template-cache/controller.spec.ts | 44 -
.../fast-ssr/src/template-cache/controller.ts | 53 -
.../src/template-parser/id-generator.ts | 55 -
.../fast-ssr/src/template-parser/op-codes.ts | 147 --
.../template-parser/template-parser.spec.ts | 216 ---
.../src/template-parser/template-parser.ts | 438 -----
.../src/template-renderer/directives.spec.ts | 41 -
.../src/template-renderer/directives.ts | 204 ---
.../hydration-marker-emitter.ts | 15 -
.../template-renderer.spec.ts | 887 ----------
.../template-renderer/template-renderer.ts | 379 -----
.../src/test-utilities/consolidate.ts | 22 -
.../fast-ssr/src/test-utilities/validators.ts | 32 -
packages/fast-ssr/src/tsconfig.json | 13 -
packages/fast-ssr/src/view.ts | 62 -
packages/fast-ssr/tsconfig.json | 18 -
72 files changed, 8 insertions(+), 9593 deletions(-)
create mode 100644 change/@microsoft-fast-html-30f1b1bf-454c-4952-a54c-7a0a5131b741.json
delete mode 100644 examples/ssr/CHANGELOG.json
delete mode 100644 examples/ssr/CHANGELOG.md
delete mode 100644 examples/ssr/README.md
delete mode 100644 examples/ssr/package.json
delete mode 100644 examples/ssr/server.js
delete mode 100644 examples/ssr/src/main.ts
delete mode 100644 examples/ssr/todo-data.json
delete mode 100644 examples/ssr/tsconfig.json
delete mode 100644 examples/ssr/vite.config.ts
delete mode 100644 packages/fast-ssr/.npmignore
delete mode 100644 packages/fast-ssr/ACKNOWLEDGEMENTS.md
delete mode 100644 packages/fast-ssr/CHANGELOG.json
delete mode 100644 packages/fast-ssr/CHANGELOG.md
delete mode 100644 packages/fast-ssr/README.md
delete mode 100644 packages/fast-ssr/api-extractor.json
delete mode 100644 packages/fast-ssr/biome.json
delete mode 100644 packages/fast-ssr/docs/api-report.api.md
delete mode 100644 packages/fast-ssr/package.json
delete mode 100644 packages/fast-ssr/playwright.config.ts
delete mode 100644 packages/fast-ssr/scripts/run-tests.mjs
delete mode 100644 packages/fast-ssr/server/README.md
delete mode 100644 packages/fast-ssr/server/placeholder.png
delete mode 100644 packages/fast-ssr/server/server.ts
delete mode 100644 packages/fast-ssr/server/tsconfig.json
delete mode 100644 packages/fast-ssr/src/configure-fast-element.ts
delete mode 100644 packages/fast-ssr/src/declarative-shadow-dom-polyfill.ts
delete mode 100644 packages/fast-ssr/src/dom-shim.spec.ts
delete mode 100644 packages/fast-ssr/src/dom-shim.ts
delete mode 100644 packages/fast-ssr/src/element-controller.ts
delete mode 100644 packages/fast-ssr/src/element-renderer/element-renderer.spec.ts
delete mode 100644 packages/fast-ssr/src/element-renderer/element-renderer.ts
delete mode 100644 packages/fast-ssr/src/element-renderer/fast-element-renderer.ts
delete mode 100644 packages/fast-ssr/src/element-renderer/interfaces.ts
delete mode 100644 packages/fast-ssr/src/escape-html.ts
delete mode 100644 packages/fast-ssr/src/event-utilities.ts
delete mode 100644 packages/fast-ssr/src/exports.spec.ts
delete mode 100644 packages/fast-ssr/src/exports.ts
delete mode 100644 packages/fast-ssr/src/fast-command-buffer/index.fixture.html
delete mode 100644 packages/fast-ssr/src/fast-command-buffer/index.ts
delete mode 100644 packages/fast-ssr/src/install-dom-shim.ts
delete mode 100644 packages/fast-ssr/src/render-info.spec.ts
delete mode 100644 packages/fast-ssr/src/render-info.ts
delete mode 100644 packages/fast-ssr/src/request-storage.spec.ts
delete mode 100644 packages/fast-ssr/src/request-storage.ts
delete mode 100644 packages/fast-ssr/src/styles/fast-style-config.ts
delete mode 100644 packages/fast-ssr/src/styles/fast-style.fixture.html
delete mode 100644 packages/fast-ssr/src/styles/fast-style.pw.spec.ts
delete mode 100644 packages/fast-ssr/src/styles/fast-style.ts
delete mode 100644 packages/fast-ssr/src/styles/style-renderer.spec.ts
delete mode 100644 packages/fast-ssr/src/styles/style-renderer.ts
delete mode 100644 packages/fast-ssr/src/styles/style-strategy.ts
delete mode 100644 packages/fast-ssr/src/template-cache/controller.spec.ts
delete mode 100644 packages/fast-ssr/src/template-cache/controller.ts
delete mode 100644 packages/fast-ssr/src/template-parser/id-generator.ts
delete mode 100644 packages/fast-ssr/src/template-parser/op-codes.ts
delete mode 100644 packages/fast-ssr/src/template-parser/template-parser.spec.ts
delete mode 100644 packages/fast-ssr/src/template-parser/template-parser.ts
delete mode 100644 packages/fast-ssr/src/template-renderer/directives.spec.ts
delete mode 100644 packages/fast-ssr/src/template-renderer/directives.ts
delete mode 100644 packages/fast-ssr/src/template-renderer/hydration-marker-emitter.ts
delete mode 100644 packages/fast-ssr/src/template-renderer/template-renderer.spec.ts
delete mode 100644 packages/fast-ssr/src/template-renderer/template-renderer.ts
delete mode 100644 packages/fast-ssr/src/test-utilities/consolidate.ts
delete mode 100644 packages/fast-ssr/src/test-utilities/validators.ts
delete mode 100644 packages/fast-ssr/src/tsconfig.json
delete mode 100644 packages/fast-ssr/src/view.ts
delete mode 100644 packages/fast-ssr/tsconfig.json
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index dd1f5e1b04a..8c826e19b20 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -29,12 +29,10 @@ FAST (`@microsoft/fast`) is a Microsoft open-source monorepo for building W3C-st
|---|---|---|
| `sites/website` | Private (not published as a package) | Documentation website source |
| `sites/benchmarks` | Private (not published as a package) | Benchmarking utilities |
-| `@microsoft/fast-ssr` | Alpha (not actively maintained) | Server-side rendering utilities |
### Example projects
- `examples/todo-app/` — A simple To-Do app demonstrating FAST usage patterns.
-- `examples/ssr/` — Server-side rendering example using `@microsoft/fast-ssr`.
## Skills
diff --git a/change/@microsoft-fast-html-30f1b1bf-454c-4952-a54c-7a0a5131b741.json b/change/@microsoft-fast-html-30f1b1bf-454c-4952-a54c-7a0a5131b741.json
new file mode 100644
index 00000000000..6861e2da194
--- /dev/null
+++ b/change/@microsoft-fast-html-30f1b1bf-454c-4952-a54c-7a0a5131b741.json
@@ -0,0 +1,7 @@
+{
+ "type": "none",
+ "comment": "chore: remove @microsoft/fast-ssr",
+ "packageName": "@microsoft/fast-html",
+ "email": "7559015+janechu@users.noreply.github.com",
+ "dependentChangeType": "none"
+}
diff --git a/examples/ssr/CHANGELOG.json b/examples/ssr/CHANGELOG.json
deleted file mode 100644
index 5e9873a0e4b..00000000000
--- a/examples/ssr/CHANGELOG.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "fast-ssr",
- "entries": [
- {
- "date": "Wed, 22 Jun 2022 20:17:50 GMT",
- "tag": "fast-ssr_v1.0.0",
- "version": "1.0.0",
- "comments": {
- "prerelease": [
- {
- "comment": "Bump @microsoft/fast-ssr to v1.0.0-beta.4",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "f28cdb9fdba9cb27904acfad7444de82d447f39e",
- "package": "fast-ssr"
- }
- ]
- }
- }
- ]
-}
diff --git a/examples/ssr/CHANGELOG.md b/examples/ssr/CHANGELOG.md
deleted file mode 100644
index 1e74f733696..00000000000
--- a/examples/ssr/CHANGELOG.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Change Log - fast-ssr
-
-This log was last generated on Wed, 22 Jun 2022 20:17:50 GMT and should not be manually modified.
-
-
-
-## 1.0.0
-
-Wed, 22 Jun 2022 20:17:50 GMT
-
-### Changes
-
-- Bump @microsoft/fast-ssr to v1.0.0-beta.4 (nicholasrice@users.noreply.github.com)
diff --git a/examples/ssr/README.md b/examples/ssr/README.md
deleted file mode 100644
index d2bb1c7b93f..00000000000
--- a/examples/ssr/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Server-Side Rendering (SSR) Tutorial
-
-An SSR implementation of the Todo App Tutorial. All components are defined by the [Todo App tutorial](../todo-app/), and the SSR implementation exists in [server.js](./server.js)
-
-## Running the experience
-
-To build the app and start the web server, run `npm start`.
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
deleted file mode 100644
index 9fae1024e57..00000000000
--- a/examples/ssr/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "@microsoft/fast-ssr-example",
- "version": "1.0.0",
- "description": "",
- "main": "dist/exports.js",
- "type": "module",
- "private": true,
- "scripts": {
- "build": "vite build",
- "watch": "tsc -p tsconfig.json --watch",
- "start": "npm run build && node server.js",
- "test": "npm run build"
- },
- "author": {
- "name": "Microsoft",
- "url": "https://discord.gg/FcSNfg4"
- },
- "homepage": "https://www.fast.design/",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Microsoft/fast.git",
- "directory": "examples/ssr"
- },
- "dependencies": {
- "@microsoft/fast-element": "^2.10.4",
- "@microsoft/fast-ssr": "^1.0.0-beta.40",
- "@microsoft/fast-todo-app-example": "1.0.0"
- }
-}
diff --git a/examples/ssr/server.js b/examples/ssr/server.js
deleted file mode 100644
index 43c37223fdd..00000000000
--- a/examples/ssr/server.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* eslint-disable no-undef */
-import "@microsoft/fast-ssr/install-dom-shim.js";
-import fs from "fs";
-import { html } from "@microsoft/fast-element";
-import fastSSR, {
- DeclarativeShadowDOMPolyfill,
- RequestStorageManager,
-} from "@microsoft/fast-ssr";
-import express from "express";
-import { DefaultTodoList, app as todoApp, TodoList } from "@microsoft/fast-todo-app-example";
-
-const app = express();
-const port = 8080;
-const { templateRenderer } = fastSSR();
-
-todoApp.define();
-
-app.use(RequestStorageManager.middleware());
-app.use(express.static("./www"));
-
-const template = html`
-
-
-
-
-
- SSR Example
-
-
-
-
-
-
-
-
-
-`;
-
-app.get("/", (req, res) => {
- const todoData = JSON.parse(fs.readFileSync("./todo-data.json").toString());
- TodoList.provide(document, new DefaultTodoList(todoData));
-
- const stream = templateRenderer.render(
- template,
- templateRenderer.createRenderInfo(),
- );
-
- for (const part of stream) {
- res.write(part);
- }
-
- res.end();
-});
-
-app.listen(port, () => {
- console.log(`SSR example app listening on port ${port}`);
-});
diff --git a/examples/ssr/src/main.ts b/examples/ssr/src/main.ts
deleted file mode 100644
index 91f51f61dc8..00000000000
--- a/examples/ssr/src/main.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { app, DefaultTodoList, TodoList } from "@microsoft/fast-todo-app-example";
-
-const SSRState = (window as any).__SSR_STATE__ || [];
-
-TodoList.provide(document, new DefaultTodoList(SSRState));
-app.define();
diff --git a/examples/ssr/todo-data.json b/examples/ssr/todo-data.json
deleted file mode 100644
index c0877f5bb39..00000000000
--- a/examples/ssr/todo-data.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- {
- "description": "pick up groceries",
- "done": true
- },
- {
- "description": "schedule baby-sitter",
- "done": true
- },
- {
- "description": "schedule vet appointment",
- "done": false
- }
-]
\ No newline at end of file
diff --git a/examples/ssr/tsconfig.json b/examples/ssr/tsconfig.json
deleted file mode 100644
index c3e15714230..00000000000
--- a/examples/ssr/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2015",
- "module": "ES2015",
- "moduleResolution": "bundler",
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "noEmitOnError": true,
- "strict": true,
- "outDir": "dist",
- "rootDir": "src",
- "lib": [
- "dom",
- ],
- "types": [
- "express"
- ]
- },
- "include": [
- "src"
- ]
-}
diff --git a/examples/ssr/vite.config.ts b/examples/ssr/vite.config.ts
deleted file mode 100644
index 46573b410d3..00000000000
--- a/examples/ssr/vite.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { defineConfig } from "vite";
-
-export default defineConfig({
- build: {
- outDir: "www",
- emptyOutDir: true,
- sourcemap: true,
- rollupOptions: {
- input: "src/main.ts",
- output: {
- entryFileNames: "bundle.js",
- },
- },
- },
-});
diff --git a/package-lock.json b/package-lock.json
index d5a5976c200..da10e83a26d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -49,16 +49,6 @@
"clean": "clean.mjs"
}
},
- "examples/ssr": {
- "name": "@microsoft/fast-ssr-example",
- "version": "1.0.0",
- "license": "MIT",
- "dependencies": {
- "@microsoft/fast-element": "^2.10.4",
- "@microsoft/fast-ssr": "^1.0.0-beta.40",
- "@microsoft/fast-todo-app-example": "1.0.0"
- }
- },
"examples/todo-app": {
"name": "@microsoft/fast-todo-app-example",
"version": "1.0.0",
@@ -1581,14 +1571,6 @@
"resolved": "sites/website",
"link": true
},
- "node_modules/@microsoft/fast-ssr": {
- "resolved": "packages/fast-ssr",
- "link": true
- },
- "node_modules/@microsoft/fast-ssr-example": {
- "resolved": "examples/ssr",
- "link": true
- },
"node_modules/@microsoft/fast-test-harness": {
"resolved": "packages/fast-test-harness",
"link": true
@@ -2771,13 +2753,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/@types/parse5": {
- "version": "5.0.3",
- "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz",
- "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@types/qs": {
"version": "6.15.0",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.0.tgz",
@@ -6750,12 +6725,6 @@
"node": ">=14.13.0"
}
},
- "node_modules/parse5": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
- "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
- "license": "MIT"
- },
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -8654,23 +8623,6 @@
"@microsoft/fast-element": "^2.10.4"
}
},
- "packages/fast-ssr": {
- "name": "@microsoft/fast-ssr",
- "version": "1.0.0-beta.40",
- "deprecated": "This package is deprecated. Please use @microsoft/fast-build and @microsoft/webui instead.",
- "license": "MIT",
- "dependencies": {
- "parse5": "^6.0.1",
- "tslib": "^2.6.3"
- },
- "devDependencies": {
- "@microsoft/fast-element": "^2.10.4",
- "@types/parse5": "^5.0.0"
- },
- "peerDependencies": {
- "@microsoft/fast-element": "^2.10.4"
- }
- },
"packages/fast-test-harness": {
"name": "@microsoft/fast-test-harness",
"version": "0.0.1",
diff --git a/packages/README.md b/packages/README.md
index ca567ec7cea..7ddcabf6eb2 100644
--- a/packages/README.md
+++ b/packages/README.md
@@ -9,13 +9,6 @@ Our web component packages.
The `@microsoft/fast-element` library is a lightweight means to easily build performant, memory-efficient, standards-compliant Web Components. FAST Elements work in every major browser and can be used in combination with any front-end framework or even without a framework. To get up and running with `@microsoft/fast-element` see [the Getting Started guide](https://fast.design/docs/getting-started/quick-start).
-## `@microsoft/fast-ssr`
-
-[](https://opensource.org/licenses/MIT)
-[](https://badge.fury.io/js/%40microsoft%2Ffast-ssr)
-
-The `@microsoft/fast-ssr` package contains a NodeJS solution for rendering FAST templates and components. While primarily intended for supporting server-side rendering (SSR) scenarios, it also allows FAST to be used as a general purpose HTML templating solution.
-
## `@microsoft/fast-router`
[](https://opensource.org/licenses/MIT)
diff --git a/packages/fast-html/RENDERING.md b/packages/fast-html/RENDERING.md
index 989ef37a44c..f184d802dd8 100644
--- a/packages/fast-html/RENDERING.md
+++ b/packages/fast-html/RENDERING.md
@@ -131,7 +131,7 @@ A content binding syntax can be broken into parts:
- `fe-b` - declares this as a FASTElement Binding.
- `start|end` - indicates the start or end of the binding.
- `number` - the number in order in the template of bindings, these increment for every binding.
-- `UUID` - a unique string identifying the binding. The examples shown here have been generated from a 10 character long string used in the [FAST SSR package](https://github.com/microsoft/fast/blob/main/packages/fast-ssr/src/template-parser/id-generator.ts).
+- `UUID` - a unique string identifying the binding.
- `fe-b` - closes the binding comment.
Bindings use `$$` as a separator string between the parts.
diff --git a/packages/fast-ssr/.npmignore b/packages/fast-ssr/.npmignore
deleted file mode 100644
index f30392d5382..00000000000
--- a/packages/fast-ssr/.npmignore
+++ /dev/null
@@ -1,11 +0,0 @@
-test
-test-utilities
-server
-temp
-src
-*.spec.js
-api-extractor.json
-.eslintrc.cjs
-.prettierignore
-playwright.config.cjs
-tsconfig.json
\ No newline at end of file
diff --git a/packages/fast-ssr/ACKNOWLEDGEMENTS.md b/packages/fast-ssr/ACKNOWLEDGEMENTS.md
deleted file mode 100644
index fac21d02af7..00000000000
--- a/packages/fast-ssr/ACKNOWLEDGEMENTS.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# Acknowledgements
-A big thank you to [Lit](https://github.com/lit) for their work on server-side rendering for Web Components. This package builds off the ideas and tentative community protocols proposed and implemented in [@lit-labs/ssr](https://github.com/lit/lit/tree/main/packages/labs/ssr), with the goal of aligning `@microsoft/fast-ssr` to these community protocols as they mature.
-
-Several modules have been copied with some modification from [@lit-labs/ssr](https://github.com/lit/lit/tree/main/packages/labs/ssr). Our hope is that as these protocols mature, these files can be removed and common resources leveraged instead. The following list of files have been copied / modified:
-- [./src/element-renderer/element-renderer.ts]()
-- [./src/template-parser/template-parser.ts]()
-- [./src/escape-html.ts]()
-- [./src/dom-shim.ts]()
-- [./src/render-info.ts]()
-
-and written with the following [license](https://github.com/lit/lit/blob/main/packages/labs/ssr/LICENSE):
-
----
-BSD 3-Clause License
-
-Copyright (c) 2019 Google LLC. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/packages/fast-ssr/CHANGELOG.json b/packages/fast-ssr/CHANGELOG.json
deleted file mode 100644
index bb769463cc8..00000000000
--- a/packages/fast-ssr/CHANGELOG.json
+++ /dev/null
@@ -1,1476 +0,0 @@
-{
- "name": "@microsoft/fast-ssr",
- "entries": [
- {
- "date": "Tue, 14 Apr 2026 00:15:09 GMT",
- "version": "1.0.0-beta.40",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.40",
- "comments": {
- "none": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "e8ce63d65a17c94baf03f271b9fa269b7f27d3e1",
- "comment": "Add test:chromium script for Chromium-only Playwright test runs"
- }
- ]
- }
- },
- {
- "date": "Fri, 10 Apr 2026 00:21:15 GMT",
- "version": "1.0.0-beta.40",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.40",
- "comments": {
- "prerelease": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "84de68790134fe7a2050a9b75ba6d3ae877d64ed",
- "comment": "chore: deprecate package in favor of @microsoft/fast-build and @microsoft/webui"
- }
- ]
- }
- },
- {
- "date": "Tue, 07 Apr 2026 00:50:48 GMT",
- "version": "1.0.0-beta.39",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.39",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "05ccb88f41eb44ec6cbe263335cc030de99f80a4",
- "comment": "chore: add biome script to run biome on changed files in packages"
- }
- ]
- }
- },
- {
- "date": "Thu, 26 Mar 2026 00:04:08 GMT",
- "version": "1.0.0-beta.39",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.39",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "6b0fd6c4a4b0c635d4e5c18d251b28abbf32bab5",
- "comment": "chore: migrate to biome for linting and formatting"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "ea46496f56cd94cb0dae65b7026998c88604aaac",
- "comment": "chore: fix publish blocker due to biome"
- }
- ]
- }
- },
- {
- "date": "Fri, 20 Mar 2026 00:07:36 GMT",
- "version": "1.0.0-beta.39",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.39",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "99a38cb16397c299566bc6f10f910c9e4e3a6f44",
- "comment": "chore: update tests to use Node.js"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "6df43be90d257a49389c188935400792b7108cc6",
- "comment": "Split tests to assist in base PR build gate times"
- },
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "1dd81b899a21eb28ed7dd15bdf1c558196775c3e",
- "comment": "chore: update dependencies and configurations"
- }
- ]
- }
- },
- {
- "date": "Thu, 05 Mar 2026 00:09:03 GMT",
- "version": "1.0.0-beta.39",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.39",
- "comments": {
- "prerelease": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "d0aa03d8d69547d58626e1f859b8df6d4d981397",
- "comment": "Tag SSR prerelease with latest"
- }
- ]
- }
- },
- {
- "date": "Tue, 17 Feb 2026 20:49:30 GMT",
- "version": "1.0.0-beta.38",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.38",
- "comments": {
- "none": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "ee995d8eeddfed3085bc41494a34886d86116252",
- "comment": "Remove foundation as a dependency"
- }
- ],
- "prerelease": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "65f87c8f1fff03011d77f8159bae96e0f3fe9fce",
- "comment": "chore: add @types/parse5 as a dev dependency"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.10.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Tue, 27 Jan 2026 17:28:54 GMT",
- "version": "1.0.0-beta.37",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.37",
- "comments": {
- "prerelease": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "d1cd327a6d37cea742b1b1df48f807fe9a1da4f7",
- "comment": "chore: hoist devDependencies"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.9.2",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Tue, 16 Dec 2025 21:27:19 GMT",
- "version": "1.0.0-beta.36",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.36",
- "comments": {
- "prerelease": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "2c8de46fbde0440593f559cd2ddd8d7c6248f68d",
- "comment": "fix: correct hydration marker indexes for templates with host bindings"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.9.1",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 08 Dec 2025 19:47:51 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.9.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Tue, 02 Dec 2025 21:47:00 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.5",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 01 Dec 2025 18:46:00 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.4",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Sun, 16 Nov 2025 07:14:25 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "13071055+chrisdholt@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "acbdd78666f70b0b49dc99f61b71af7c0b3e259e",
- "comment": "chore: flatten repository package structure"
- }
- ]
- }
- },
- {
- "date": "Wed, 12 Nov 2025 20:41:54 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.3",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Fri, 31 Oct 2025 20:45:55 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "6fdf0254c94cb3caefe946803d0e393ab30c31f9",
- "comment": "chore: hoist @playwright/test to root and upgrade to 1.56.1"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.2",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Tue, 21 Oct 2025 16:17:27 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.1",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 13 Oct 2025 00:37:08 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.8.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Wed, 20 Aug 2025 20:57:02 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.7.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Wed, 06 Aug 2025 07:15:14 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.6.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Wed, 16 Jul 2025 22:43:52 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.5.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Fri, 30 May 2025 05:02:03 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.4.1",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Fri, 23 May 2025 23:52:29 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.4.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 05 May 2025 00:33:41 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.3.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Wed, 16 Apr 2025 15:53:12 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.2.1",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 24 Mar 2025 18:26:13 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.2.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Thu, 13 Feb 2025 17:34:08 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "7bbe060abd0ca4b9f7bd7aba3937b604e476eaca",
- "comment": "Specify prereleasePrefix, allow bumpDeps"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.1.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Wed, 11 Dec 2024 19:53:32 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "26c5078fff7b7d4990d4143913a71def113f2874",
- "comment": "Update playwright image and dependency to latest"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "a3c98e184642949bbb5b4318b5e233b49ad0b902",
- "comment": "Attempt to address flaky test by increasing timeout"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.1",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Mon, 19 Aug 2024 22:04:19 GMT",
- "version": "1.0.0-beta.35",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.35",
- "comments": {
- "none": [
- {
- "author": "13071055+chrisdholt@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "630a5e25a953201afa016e54aa77cf68d9d7663a",
- "comment": "update beachball and move disallowedChangeTypes to package.json"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "02762acdca5412565acb89fb5b985fb5453347e1",
- "comment": "Fix a dependency issue with express open redirect vulnerability"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "78910b1158a6a24b717b3d94616fa93ab6786ab4",
- "comment": "Remove yarn and lerna in favor of npm"
- }
- ],
- "prerelease": [
- {
- "author": "171390049+prabhujayapal@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "882eded0b9dbc7d129ae4e634878024a0d7ffc08",
- "comment": "Adds support for FASTElement hydration"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0",
- "commit": "not available"
- }
- ]
- }
- },
- {
- "date": "Thu, 20 Jun 2024 17:00:56 GMT",
- "version": "1.0.0-beta.33",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.33",
- "comments": {
- "prerelease": [
- {
- "author": "seanmonahan@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "9a78d697ac6f9f799e420e48cf32ffec19800b9c",
- "comment": "fix: typos in SSR README"
- },
- {
- "author": "seanmonahan@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "4a282aee05fadafb9f053e31cb9272517c272744",
- "comment": "fix: change 'shadowroot' to 'shadowrootmode' to match spec"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.33",
- "commit": "not available"
- }
- ],
- "none": [
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "4b23b5caa76c172d3ea6c6559699d632a278442c",
- "comment": "tslib updated to fixed version"
- },
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "5dac26f674ca755476b5a38bda5506947b42de93",
- "comment": "fix parse5 type imports"
- },
- {
- "author": "7559015+janechu@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "00bccd7812ca072fc2efdf39af7762bbfdc90846",
- "comment": "Remove eslint config package"
- },
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "97ef4d7a3880212bbb4f895459a047429a113472",
- "comment": "upgrade playwright to 1.41"
- }
- ]
- }
- },
- {
- "date": "Wed, 20 Dec 2023 19:03:48 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.32",
- "version": "1.0.0-beta.32",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "0eb5c61c4a92655d5aa44960c34474c9d4b95227",
- "comment": "use local placeholder image in fast-ssr tests"
- }
- ],
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.32",
- "commit": "fd65254531ac3a593b32528d81b44ebf82c8e4ab"
- }
- ]
- }
- },
- {
- "date": "Fri, 18 Aug 2023 22:48:12 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.31",
- "version": "1.0.0-beta.31",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.31",
- "commit": "d4d8c961b3ad5262924120070057ad6554dfdcb9"
- }
- ]
- }
- },
- {
- "date": "Fri, 18 Aug 2023 00:04:37 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.30",
- "version": "1.0.0-beta.30",
- "comments": {
- "prerelease": [
- {
- "author": "chhol@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "2dab94c0eda05bee7c4b497e68951d79d6fcbe46",
- "comment": "Breaking: update fast-ssr export paths to include extensions"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.26",
- "commit": "2dab94c0eda05bee7c4b497e68951d79d6fcbe46"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.30",
- "commit": "2dab94c0eda05bee7c4b497e68951d79d6fcbe46"
- }
- ]
- }
- },
- {
- "date": "Sat, 12 Aug 2023 00:26:36 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.29",
- "version": "1.0.0-beta.29",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.25",
- "commit": "2297004e14386b5a689ba96361f8d8eebee69cd8"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.29",
- "commit": "2297004e14386b5a689ba96361f8d8eebee69cd8"
- }
- ]
- }
- },
- {
- "date": "Fri, 16 Jun 2023 18:17:13 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.28",
- "version": "1.0.0-beta.28",
- "comments": {
- "none": [
- {
- "author": "chhol@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "ca0e62ee8d05f72d1d8c1ad66bd6eea8e3f0a4eb",
- "comment": "update prettier and eslint-config-prettier versions"
- }
- ],
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.24",
- "commit": "8250aa8352940584ff443b550ee756d49f01c478"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.28",
- "commit": "8250aa8352940584ff443b550ee756d49f01c478"
- }
- ]
- }
- },
- {
- "date": "Tue, 28 Mar 2023 22:14:10 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.27",
- "version": "1.0.0-beta.27",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.23",
- "commit": "032285c2bf0311f9f44cbc875b40696fc8f62857"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.27",
- "commit": "032285c2bf0311f9f44cbc875b40696fc8f62857"
- }
- ]
- }
- },
- {
- "date": "Sat, 11 Mar 2023 00:09:49 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.26",
- "version": "1.0.0-beta.26",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.22",
- "commit": "dcf64d0383f613fd0c79b6f4f5ef010fccdbc11f"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.26",
- "commit": "dcf64d0383f613fd0c79b6f4f5ef010fccdbc11f"
- }
- ]
- }
- },
- {
- "date": "Tue, 14 Feb 2023 04:02:36 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.25",
- "version": "1.0.0-beta.25",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.21",
- "commit": "e504d092f81623e6332fa8cdf72ce9114e6c842e"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.25",
- "commit": "e504d092f81623e6332fa8cdf72ce9114e6c842e"
- }
- ]
- }
- },
- {
- "date": "Wed, 11 Jan 2023 22:07:44 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.24",
- "version": "1.0.0-beta.24",
- "comments": {
- "prerelease": [
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "5c3b2f0431ae8f840d3dc778ff93be73b585c6e2",
- "comment": "fix(fast-ssr): update to use html.partial"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.20",
- "commit": "2bb85c931a84d4de3a8b61d6f26f89f2d9a525f6"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.24",
- "commit": "2bb85c931a84d4de3a8b61d6f26f89f2d9a525f6"
- }
- ],
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "555f1b2cd614a1d5a9bc3985fb892d040c110cb3",
- "comment": "remove tooltip options from dom-shim spec"
- }
- ]
- }
- },
- {
- "date": "Fri, 02 Dec 2022 01:18:22 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.23",
- "version": "1.0.0-beta.23",
- "comments": {
- "prerelease": [
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "22f68aaabe18d350ffb12469d53b09fec5be81d1",
- "comment": "feat: shim DOMTokenList for class and part properties on HTMLElement"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.19",
- "commit": "040867e9a2a9e0ae25b78dfb3265fbe8f60fe023"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.23",
- "commit": "040867e9a2a9e0ae25b78dfb3265fbe8f60fe023"
- }
- ]
- }
- },
- {
- "date": "Tue, 15 Nov 2022 02:40:34 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.22",
- "version": "1.0.0-beta.22",
- "comments": {
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "ebfe1a316b75ecdd52622d62a525b271626fb463",
- "comment": "Added configuration option to fast-ssr to render custom directives"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "3c14603089495a7af8ed5b55122c418b47c45fd5",
- "comment": "add new DOM Policy protection throughout"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.18",
- "commit": "416dc9167e9d41e6ffe11d87ed79b2f455357923"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.22",
- "commit": "416dc9167e9d41e6ffe11d87ed79b2f455357923"
- }
- ]
- }
- },
- {
- "date": "Fri, 04 Nov 2022 22:28:49 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.21",
- "version": "1.0.0-beta.21",
- "comments": {
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "9b183666f84a94b40274391d016d3ceb00509d2c",
- "comment": "export features from DOM shim, refactor for better TypeScript support"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "a5f67af6d27aa3bed5bffc10d0c58ebcc606a439",
- "comment": "Adds export path for RequestStorage"
- },
- {
- "author": "daviwu@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "20f5c40d27283c4df856970e854c8712c85c29c1",
- "comment": "Fix boolean attribute rendering issues and throw error for unknown/object type of attributes"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.21",
- "commit": "e60decc0627e763249e74937e00fab61c5c748e6"
- }
- ]
- }
- },
- {
- "date": "Tue, 01 Nov 2022 23:26:26 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.20",
- "version": "1.0.0-beta.20",
- "comments": {
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "32d18d0900047899d1dadfe94f7923b6164b0cf3",
- "comment": "Adds `defer-hydration` attribute emission during rendering"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "b7bc2ba4dc3099ae1e33554c53e5675946302de9",
- "comment": "Fixed bug preventing dist files from being included in the published package"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.17",
- "commit": "32d18d0900047899d1dadfe94f7923b6164b0cf3"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.20",
- "commit": "32d18d0900047899d1dadfe94f7923b6164b0cf3"
- }
- ]
- }
- },
- {
- "date": "Fri, 28 Oct 2022 20:44:44 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.19",
- "version": "1.0.0-beta.19",
- "comments": {
- "none": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "7aaf156483ac6f5922a529b5b54e04e87445d882",
- "comment": "use floating-ui for menu-item submenus"
- }
- ],
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "2536c024febdf8a89300c257805a19a946f8039d",
- "comment": "Adds shim for MediaQueryList.addEventListener and updates matchMedia to always use the window's MediaQueryList"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.16",
- "commit": "5b745b1fb3bf249a7a2d172b7fb69cb08694aadd"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.19",
- "commit": "5b745b1fb3bf249a7a2d172b7fb69cb08694aadd"
- }
- ]
- }
- },
- {
- "date": "Tue, 25 Oct 2022 20:24:32 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.18",
- "version": "1.0.0-beta.18",
- "comments": {
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "a70a376f2f8ca6c162191dc1ba036ccd7b13cff0",
- "comment": "add feature to disable rendering of a component by the element renderer"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.15",
- "commit": "220cc7e0e0de490e51cc8b6f42ff46b03228beaa"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.18",
- "commit": "220cc7e0e0de490e51cc8b6f42ff46b03228beaa"
- }
- ]
- }
- },
- {
- "date": "Fri, 14 Oct 2022 18:26:11 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.17",
- "version": "1.0.0-beta.17",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.14",
- "commit": "bcfbcb5be4433fb1fb0fab1697f13d345980db87"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.17",
- "commit": "bcfbcb5be4433fb1fb0fab1697f13d345980db87"
- }
- ]
- }
- },
- {
- "date": "Mon, 10 Oct 2022 20:28:02 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.16",
- "version": "1.0.0-beta.16",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.13",
- "commit": "ed2977ef6556964e68ea3ab0e4951320a1527baf"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.16",
- "commit": "ed2977ef6556964e68ea3ab0e4951320a1527baf"
- }
- ]
- }
- },
- {
- "date": "Thu, 06 Oct 2022 23:21:20 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.15",
- "version": "1.0.0-beta.15",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.12",
- "commit": "a69c2e3c0700918fef5ba934909781cc8ab71384"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.15",
- "commit": "a69c2e3c0700918fef5ba934909781cc8ab71384"
- }
- ]
- }
- },
- {
- "date": "Wed, 05 Oct 2022 23:26:01 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.14",
- "version": "1.0.0-beta.14",
- "comments": {
- "prerelease": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "e9d881182e7c5f8c5dd1cac2415599c38654c107",
- "comment": "Added RequestStorageManager.uninstallDOMShim() method to support uninstalling installed DOM shims"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "21d1de94be2b9399ddc43a2b93c6483fa7304591",
- "comment": "add {shadowOptions: null} support"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.11",
- "commit": "21d1de94be2b9399ddc43a2b93c6483fa7304591"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.14",
- "commit": "21d1de94be2b9399ddc43a2b93c6483fa7304591"
- }
- ]
- }
- },
- {
- "date": "Mon, 03 Oct 2022 23:44:38 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.13",
- "version": "1.0.0-beta.13",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.10",
- "commit": "e23f4375f183f0672f9aeafd0e58411adb66ae90"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.13",
- "commit": "e23f4375f183f0672f9aeafd0e58411adb66ae90"
- }
- ]
- }
- },
- {
- "date": "Wed, 28 Sep 2022 20:45:51 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.12",
- "version": "1.0.0-beta.12",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.9",
- "commit": "08fab33015853b7f820fdfdac2aecddfeb31843f"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.12",
- "commit": "08fab33015853b7f820fdfdac2aecddfeb31843f"
- }
- ]
- }
- },
- {
- "date": "Tue, 27 Sep 2022 22:31:52 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.11",
- "version": "1.0.0-beta.11",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.8",
- "commit": "8834c6732c727d39f92f72b197388453a9c17f9b"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.11",
- "commit": "8834c6732c727d39f92f72b197388453a9c17f9b"
- }
- ]
- }
- },
- {
- "date": "Fri, 23 Sep 2022 22:53:27 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.10",
- "version": "1.0.0-beta.10",
- "comments": {
- "none": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "d1918c1583855b1b4b1f368dee00c53f0cf900b3",
- "comment": "updates README.md with docs for dom-shim augmentation."
- }
- ],
- "prerelease": [
- {
- "author": "863023+radium-v@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "ec2b158dcf39c8b4152b22c3b65963046b473e17",
- "comment": "update playwright"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "c1909e9899d517f9483b24043d49a8b193af3c26",
- "comment": "Refactor core components to support Promise return types"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "c1909e9899d517f9483b24043d49a8b193af3c26",
- "comment": "Adds support for async component rendering through the PendingTask protocol"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "2edd63a8abe24c68cfc7c76d773c912c6f2d6543",
- "comment": "fix: updae SSR to use the new behavior API"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.7",
- "commit": "1646b26450a08a77c8bd6302560fe12cc6989ae1"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.10",
- "commit": "1646b26450a08a77c8bd6302560fe12cc6989ae1"
- }
- ]
- }
- },
- {
- "date": "Thu, 01 Sep 2022 21:53:34 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.9",
- "version": "1.0.0-beta.9",
- "comments": {
- "prerelease": [
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "95d7bd387e1cc78b3681e715298a1dfbd86ecefc",
- "comment": "feat: expose backend of RequestStorageManager for advanced integration"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "675c4370613d49bb5a974bdfedb773b880a78b6e",
- "comment": "add default renderInfo implementation to TemplateRenderer.render"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.6",
- "commit": "6b0f08574475d8b28cc2df67bf72b9041c2ad285"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.9",
- "commit": "6b0f08574475d8b28cc2df67bf72b9041c2ad285"
- }
- ]
- }
- },
- {
- "date": "Fri, 26 Aug 2022 18:06:43 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.8",
- "version": "1.0.0-beta.8",
- "comments": {
- "prerelease": [
- {
- "author": "erhuan@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "4fe1bc5f1be71e2e0ea3bb46871c597fc993dc5f",
- "comment": "After install DOM Shim, globals will now return the original global instead of the shimmed version in async local storage if code is not in storage scope."
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.8",
- "commit": "4fe1bc5f1be71e2e0ea3bb46871c597fc993dc5f"
- }
- ]
- }
- },
- {
- "date": "Thu, 18 Aug 2022 20:46:10 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.7",
- "version": "1.0.0-beta.7",
- "comments": {
- "prerelease": [
- {
- "author": "32497422+KingOfTac@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "29308db7920baaaac5b31b206d551669e165bc06",
- "comment": "add subpath export for package.json to packages"
- },
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "d1492e8e378c30b684f4ff4bed5f86b99a88934f",
- "comment": "implement CSSStyleSheet behavior to support DesignToken in SSR"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "e8fa95d3d2a219ce462cd4e70758b8f90083ee5a",
- "comment": "feat: implement Declarative Shadow DOM polyfill as an optional plugin for FAST Server Side Rendering"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.5",
- "commit": "0b57f1bc812e8e6371b7d27bb625f99a25bfaa66"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.7",
- "commit": "0b57f1bc812e8e6371b7d27bb625f99a25bfaa66"
- }
- ]
- }
- },
- {
- "date": "Wed, 27 Jul 2022 17:36:33 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.6",
- "version": "1.0.0-beta.6",
- "comments": {
- "prerelease": [
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.6",
- "commit": "7df4548954621d6247ab7fe3fae1a1ba0d33294b"
- }
- ]
- }
- },
- {
- "date": "Mon, 18 Jul 2022 21:10:01 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.5",
- "version": "1.0.0-beta.5",
- "comments": {
- "prerelease": [
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "27dc848327b25328e428f67505684d2171b58711",
- "comment": "feat: update SSR to new binding APIs"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "a44a5497dd3210b5bc3ed0568f31505f9b93a312",
- "comment": "feat: enable the render directive to work in SSR"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "4567188a47598b3d2589b05f039bea695f2b8875",
- "comment": "fix: update server-side-rendering of the repeat directive to use the renamed dataBinding property of the repeat directive"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "7f4d6b5587f6eff52e5b7f414e27543bb4d7772d",
- "comment": "feat: add request storage to support per-request context in server side rendering"
- },
- {
- "author": "roeisenb@microsoft.com",
- "package": "@microsoft/fast-ssr",
- "commit": "b32eb1004960da95b74dba7f111ee859b6655896",
- "comment": "fix: server side rendering foundation tests"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.4",
- "commit": "2ff46a32cdd9af12b236d0e2f3436a4de782e8ee"
- },
- {
- "author": "beachball",
- "package": "@microsoft/fast-ssr",
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.5",
- "commit": "2ff46a32cdd9af12b236d0e2f3436a4de782e8ee"
- }
- ],
- "none": [
- {
- "author": "nicholasrice@users.noreply.github.com",
- "package": "@microsoft/fast-ssr",
- "commit": "a27daf24a7117a6ccf1db673c1adfadff8548512",
- "comment": "adds the render directive to the directive support table"
- }
- ]
- }
- },
- {
- "date": "Wed, 22 Jun 2022 20:17:50 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.4",
- "version": "1.0.0-beta.4",
- "comments": {
- "prerelease": [
- {
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.3",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "f28cdb9fdba9cb27904acfad7444de82d447f39e",
- "package": "@microsoft/fast-ssr"
- }
- ]
- }
- },
- {
- "date": "Wed, 15 Jun 2022 17:41:10 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.3",
- "version": "1.0.0-beta.3",
- "comments": {
- "prerelease": [
- {
- "comment": "Implemented Event support into SSR",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "d144322472e6ab439ed1e487eaeccd022d61ce19",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "feat: simplify execution context to align closer with v1",
- "author": "roeisenb@microsoft.com",
- "commit": "488d051999c43b93a0beef4db30a2bddd6bbdc64",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "chore: fix package.json type fields",
- "author": "roeisenb@microsoft.com",
- "commit": "e86a638b9e84cbf36d950025889742944e68e512",
- "package": "@microsoft/fast-ssr"
- }
- ],
- "none": [
- {
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.3",
- "author": "7559015+janechu@users.noreply.github.com",
- "commit": "a6b2a570c1cb592bc92b4c9d8366d197658819ae",
- "package": "@microsoft/fast-ssr"
- }
- ]
- }
- },
- {
- "date": "Wed, 01 Jun 2022 22:21:24 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.2",
- "version": "1.0.0-beta.2",
- "comments": {
- "prerelease": [
- {
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.2",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "e4740b8f077b77954ae82ff698f144181e1504a7",
- "package": "@microsoft/fast-ssr"
- }
- ]
- }
- },
- {
- "date": "Wed, 01 Jun 2022 17:53:14 GMT",
- "tag": "@microsoft/fast-ssr_v1.0.0-beta.1",
- "version": "1.0.0-beta.1",
- "comments": {
- "prerelease": [
- {
- "comment": "update npmignore file w/ new project structure",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "remove private field from package.json",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "chore: configure fast-ssr for internals stripping",
- "author": "roeisenb@microsoft.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "Set prerelease version",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "5b313a3262b977acbee3c2efac87d0d14a82f792",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "Adds DOM shim support for APIs in @microsoft/fast-foundation",
- "author": "nicholasrice@users.noreply.github.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- }
- ],
- "none": [
- {
- "comment": "update api extractor and typescript to use the latest versions",
- "author": "chhol@microsoft.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "Bump @microsoft/fast-element to v2.0.0-beta.1",
- "author": "roeisenb@microsoft.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- },
- {
- "comment": "Bump @microsoft/fast-foundation to v3.0.0-alpha.1",
- "author": "roeisenb@microsoft.com",
- "commit": "4699e77715068f8610aae908ede6356a249574b6",
- "package": "@microsoft/fast-ssr"
- }
- ]
- }
- }
- ]
-}
diff --git a/packages/fast-ssr/CHANGELOG.md b/packages/fast-ssr/CHANGELOG.md
deleted file mode 100644
index ca479ac872f..00000000000
--- a/packages/fast-ssr/CHANGELOG.md
+++ /dev/null
@@ -1,381 +0,0 @@
-# Change Log - @microsoft/fast-ssr
-
-
-
-
-
-## 1.0.0-beta.40
-
-Fri, 10 Apr 2026 00:21:15 GMT
-
-### Changes
-
-- chore: deprecate package in favor of @microsoft/fast-build and @microsoft/webui (7559015+janechu@users.noreply.github.com)
-
-## 1.0.0-beta.39
-
-Thu, 05 Mar 2026 00:09:03 GMT
-
-### Changes
-
-- Tag SSR prerelease with latest (7559015+janechu@users.noreply.github.com)
-
-## 1.0.0-beta.38
-
-Tue, 17 Feb 2026 20:49:30 GMT
-
-### Changes
-
-- chore: add @types/parse5 as a dev dependency (863023+radium-v@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.10.0
-
-## 1.0.0-beta.37
-
-Tue, 27 Jan 2026 17:28:54 GMT
-
-### Changes
-
-- chore: hoist devDependencies (863023+radium-v@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.9.2
-
-## 1.0.0-beta.36
-
-Tue, 16 Dec 2025 21:27:19 GMT
-
-### Changes
-
-- fix: correct hydration marker indexes for templates with host bindings (863023+radium-v@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.9.1
-
-## 1.0.0-beta.35
-
-Mon, 19 Aug 2024 22:04:19 GMT
-
-### Changes
-
-- Adds support for FASTElement hydration (171390049+prabhujayapal@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0
-
-## 1.0.0-beta.33
-
-Thu, 20 Jun 2024 17:00:56 GMT
-
-### Changes
-
-- fix: typos in SSR README (seanmonahan@microsoft.com)
-- fix: change 'shadowroot' to 'shadowrootmode' to match spec (seanmonahan@microsoft.com)
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.33
-
-## 1.0.0-beta.32
-
-Wed, 20 Dec 2023 19:03:48 GMT
-
-### Changes
-
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.32
-
-## 1.0.0-beta.31
-
-Fri, 18 Aug 2023 22:48:12 GMT
-
-### Changes
-
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.31
-
-## 1.0.0-beta.30
-
-Fri, 18 Aug 2023 00:04:37 GMT
-
-### Changes
-
-- Breaking: update fast-ssr export paths to include extensions (chhol@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.26
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.30
-
-## 1.0.0-beta.29
-
-Sat, 12 Aug 2023 00:26:36 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.25
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.29
-
-## 1.0.0-beta.28
-
-Fri, 16 Jun 2023 18:17:13 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.24
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.28
-
-## 1.0.0-beta.27
-
-Tue, 28 Mar 2023 22:14:10 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.23
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.27
-
-## 1.0.0-beta.26
-
-Sat, 11 Mar 2023 00:09:49 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.22
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.26
-
-## 1.0.0-beta.25
-
-Tue, 14 Feb 2023 04:02:36 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.21
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.25
-
-## 1.0.0-beta.24
-
-Wed, 11 Jan 2023 22:07:44 GMT
-
-### Changes
-
-- fix(fast-ssr): update to use html.partial (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.20
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.24
-
-## 1.0.0-beta.23
-
-Fri, 02 Dec 2022 01:18:22 GMT
-
-### Changes
-
-- feat: shim DOMTokenList for class and part properties on HTMLElement (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.19
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.23
-
-## 1.0.0-beta.22
-
-Tue, 15 Nov 2022 02:40:34 GMT
-
-### Changes
-
-- Added configuration option to fast-ssr to render custom directives (nicholasrice@users.noreply.github.com)
-- add new DOM Policy protection throughout (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.18
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.22
-
-## 1.0.0-beta.21
-
-Fri, 04 Nov 2022 22:28:49 GMT
-
-### Changes
-
-- export features from DOM shim, refactor for better TypeScript support (nicholasrice@users.noreply.github.com)
-- Adds export path for RequestStorage (nicholasrice@users.noreply.github.com)
-- Fix boolean attribute rendering issues and throw error for unknown/object type of attributes (daviwu@microsoft.com)
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.21
-
-## 1.0.0-beta.20
-
-Tue, 01 Nov 2022 23:26:26 GMT
-
-### Changes
-
-- Adds `defer-hydration` attribute emission during rendering (nicholasrice@users.noreply.github.com)
-- Fixed bug preventing dist files from being included in the published package (nicholasrice@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.17
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.20
-
-## 1.0.0-beta.19
-
-Fri, 28 Oct 2022 20:44:44 GMT
-
-### Changes
-
-- Adds shim for MediaQueryList.addEventListener and updates matchMedia to always use the window's MediaQueryList (nicholasrice@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.16
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.19
-
-## 1.0.0-beta.18
-
-Tue, 25 Oct 2022 20:24:32 GMT
-
-### Changes
-
-- add feature to disable rendering of a component by the element renderer (nicholasrice@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.15
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.18
-
-## 1.0.0-beta.17
-
-Fri, 14 Oct 2022 18:26:11 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.14
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.17
-
-## 1.0.0-beta.16
-
-Mon, 10 Oct 2022 20:28:02 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.13
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.16
-
-## 1.0.0-beta.15
-
-Thu, 06 Oct 2022 23:21:20 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.12
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.15
-
-## 1.0.0-beta.14
-
-Wed, 05 Oct 2022 23:26:01 GMT
-
-### Changes
-
-- Added RequestStorageManager.uninstallDOMShim() method to support uninstalling installed DOM shims (nicholasrice@users.noreply.github.com)
-- add {shadowOptions: null} support (nicholasrice@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.11
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.14
-
-## 1.0.0-beta.13
-
-Mon, 03 Oct 2022 23:44:38 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.10
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.13
-
-## 1.0.0-beta.12
-
-Wed, 28 Sep 2022 20:45:51 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.9
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.12
-
-## 1.0.0-beta.11
-
-Tue, 27 Sep 2022 22:31:52 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.8
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.11
-
-## 1.0.0-beta.10
-
-Fri, 23 Sep 2022 22:53:27 GMT
-
-### Changes
-
-- update playwright (863023+radium-v@users.noreply.github.com)
-- Refactor core components to support Promise return types (nicholasrice@users.noreply.github.com)
-- Adds support for async component rendering through the PendingTask protocol (nicholasrice@users.noreply.github.com)
-- fix: updae SSR to use the new behavior API (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.7
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.10
-
-## 1.0.0-beta.9
-
-Thu, 01 Sep 2022 21:53:34 GMT
-
-### Changes
-
-- feat: expose backend of RequestStorageManager for advanced integration (roeisenb@microsoft.com)
-- add default renderInfo implementation to TemplateRenderer.render (nicholasrice@users.noreply.github.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.6
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.9
-
-## 1.0.0-beta.8
-
-Fri, 26 Aug 2022 18:06:43 GMT
-
-### Changes
-
-- After install DOM Shim, globals will now return the original global instead of the shimmed version in async local storage if code is not in storage scope. (erhuan@microsoft.com)
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.8
-
-## 1.0.0-beta.7
-
-Thu, 18 Aug 2022 20:46:10 GMT
-
-### Changes
-
-- add subpath export for package.json to packages (32497422+KingOfTac@users.noreply.github.com)
-- implement CSSStyleSheet behavior to support DesignToken in SSR (nicholasrice@users.noreply.github.com)
-- feat: implement Declarative Shadow DOM polyfill as an optional plugin for FAST Server Side Rendering (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.5
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.7
-
-## 1.0.0-beta.6
-
-Wed, 27 Jul 2022 17:36:33 GMT
-
-### Changes
-
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.6
-
-## 1.0.0-beta.5
-
-Mon, 18 Jul 2022 21:10:01 GMT
-
-### Changes
-
-- feat: update SSR to new binding APIs (roeisenb@microsoft.com)
-- feat: enable the render directive to work in SSR (roeisenb@microsoft.com)
-- fix: update server-side-rendering of the repeat directive to use the renamed dataBinding property of the repeat directive (roeisenb@microsoft.com)
-- feat: add request storage to support per-request context in server side rendering (roeisenb@microsoft.com)
-- fix: server side rendering foundation tests (roeisenb@microsoft.com)
-- Bump @microsoft/fast-element to v2.0.0-beta.4
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.5
-
-## 1.0.0-beta.4
-
-Wed, 22 Jun 2022 20:17:50 GMT
-
-### Changes
-
-- Bump @microsoft/fast-element to v2.0.0-beta.3 (nicholasrice@users.noreply.github.com)
-
-## 1.0.0-beta.3
-
-Wed, 15 Jun 2022 17:41:10 GMT
-
-### Changes
-
-- Implemented Event support into SSR (nicholasrice@users.noreply.github.com)
-- feat: simplify execution context to align closer with v1 (roeisenb@microsoft.com)
-- chore: fix package.json type fields (roeisenb@microsoft.com)
-
-## 1.0.0-beta.2
-
-Wed, 01 Jun 2022 22:21:24 GMT
-
-### Changes
-
-- Bump @microsoft/fast-foundation to v3.0.0-alpha.2 (nicholasrice@users.noreply.github.com)
-
-## 1.0.0-beta.1
-
-Wed, 01 Jun 2022 17:53:14 GMT
-
-### Changes
-
-- update npmignore file w/ new project structure (nicholasrice@users.noreply.github.com)
-- remove private field from package.json (nicholasrice@users.noreply.github.com)
-- chore: configure fast-ssr for internals stripping (roeisenb@microsoft.com)
-- Set prerelease version (nicholasrice@users.noreply.github.com)
-- Adds DOM shim support for APIs in @microsoft/fast-foundation (nicholasrice@users.noreply.github.com)
diff --git a/packages/fast-ssr/README.md b/packages/fast-ssr/README.md
deleted file mode 100644
index 00c586dfb66..00000000000
--- a/packages/fast-ssr/README.md
+++ /dev/null
@@ -1,374 +0,0 @@
-# FAST SSR
-
-> ⚠️ **Deprecated**
->
-> `@microsoft/fast-ssr` is no longer actively maintained and has been deprecated in favor of [`@microsoft/fast-build`](https://www.npmjs.com/package/@microsoft/fast-build) and `@microsoft/webui`.
-> Please migrate to those packages for server-side rendering support going forward.
-
-[](https://opensource.org/licenses/MIT)
-[](https://badge.fury.io/js/%40microsoft%2Ffast-ssr)
-
-The `@microsoft/fast-ssr` package contains a NodeJS solution for rendering FAST templates and components. While primarily intended for supporting server-side rendering (SSR) scenarios, it also allows FAST to be used as a general purpose HTML templating solution.
-
-## Requirements
-- [NodeJS ^16.0.0](https://nodejs.org)
-- [`@microsoft/fast-element@^2.0.0`](https://www.npmjs.com/package/@microsoft/fast-element)
-
-## Important Notes
-`@microsoft/fast-ssr` is built using ES modules. This documentation assumes all JavaScript is run as ES module scripts. If that is not the case in your project, you can force ES module format by converting `.js` extensions to `.mjs`. [Details on this here.](https://nodejs.org/api/packages.html)
-
-### Design Philosophy
-Performance is a core tenant of this package. To help achieve that, it avoids needing a comprehensive DOM implementation to render components, instead relying on a minimal set of DOM globals provided by the packaged DOM shim. Doing so comes with an important idea to understand; non-custom elements (`
`, `
`, etc) are never instantiated as JavaScript objects and you cannot gain references to these elements declared in a template. The parts of a template containing these elements are emitted as-is to the SSR string result (with any bindings evaluated). It is for this reason [certain directives are no-ops](#directive-support-matrix). Additionally, components are rendered using only their template. Imperative code that adds elements or DOM content to a component will be invisible to the template renderer and will not be yielded in the final string result.
-
-## Community Alignment
-`@microsoft/fast-ssr` internally implements the `ElementRenderer` interface proposed [here](https://github.com/webcomponents-cg/community-protocols/issues/7#issuecomment-825151215) and implemented in [`@lit-labs/ssr`](https://github.com/lit/lit/tree/main/packages/labs/ssr). The `ElementRenderer` interface allows Custom Elements created by different component authoring libraries to be rendered side-by-side, maximizing the portability and interoperability of Web Components. For more on how to do that, see the section on [configuring the RenderInfo object](#configuring-the-renderinfo-object).
-
-## Installation
-Install `@microsoft/fast-ssr` and `@microsoft/fast-element` using your package manager of choice:
-
-```shell
-npm install --save @microsoft/fast-ssr @microsoft/fast-element
-```
-## Usage
-### Installing the DOM Shim
-`@microsoft/fast-ssr` requires a minimal DOM implementation to function. Install the shim by importing it. Doing so will ensure availability of certain DOM globals like `HTMLElement`, `Document`, etc.
-
-```js
-import "@microsoft/fast-ssr/install-dom-shim.js";
-```
-
-Alternatively, a full DOM implementation such as [`jsdom`](https://github.com/jsdom/jsdom) or [`happy-dom`](https://github.com/capricorn86/happy-dom) can be used.
-
-#### Augmenting the DOM Shim
-To augment the properties installed by the DOM shim, import the Window factory and installer directly, and provide an object to `createWindow()` with the properties that should be added or overwritten.
-
-```ts
-import {
- createWindow,
- installWindowOnGlobal,
-} from '@microsoft/fast-ssr/dom-shim';
-
-installWindowOnGlobal(createWindow({ isSSR: true }));
-```
-
-### Construct the Renderer
-Import the renderer factory and construct a `TemplateRenderer`.
-```js
-import fastSSR from "@microsoft/fast-ssr";
-
-const { templateRenderer } = fastSSR();
-```
-
-### Define Custom Elements
-Ensure that the custom elements used in the template you are rendering are defined in the `customElements` registry. This example defines a component directly, but you can also import any components being used:
-```js
-import { attr, customElement, html, FASTElement } from "@microsoft/fast-element";
-
-@customElement({name: "my-element", template: html`
${x => x.message}
`})
-class MyElement extends FASTElement {
- @attr
- public message = "Hello World";
-}
-```
-
-### Rendering
-With the `TemplateRenderer` created and a custom element defined, the `TemplateRenderer` can now render a template with that element. The result will be an `iterableIterator`, which allows the result to be streamed to the client before the entire template has been rendered.
-
-```js
-const result = templateRenderer.render(html`
-
-
-
-
-
-
-`);
-```
-
-The template being rendered can also be a fragment of HTML, it does not need to be a valid document:
-
-```js
-const result = templateRenderer.render(html``);
-```
-
-#### Rendering Strings
-The template renderer can also render `string` types just as it would a template:
-
-```js
-const result = templateRenderer.render("");
-```
-
-#### Rendering Templates with Bindings
-A template can be rendered with arbitrary source data by providing that source as the third argument to `.render()`. When doing so, bindings are invoked with that source data:
-
-```ts
-const result = templateRenderer.render(html`
-
${x => x.message}
-`, templateRenderer.createRenderInfo(), { message: "hello world" });
-```
-
-#### Rendering Templates with Directives
-The `TemplateRenderer` can render templates with directives such as `when` and `repeat`. Some directives are no-ops, see the [directive support matrix](#directive-support-matrix) for details.
-
-```ts
-import { when, repeat } from "@microsoft/fast-element";
-
-const result = templateRenderer.render(html`
- ${when(x => x.shouldRender, html`
-
Colors of a pixel
- ${repeat(x => x.data, html`
${color => color}
`)}
- `)}
-`, templateRenderer.createRenderInfo(), { shouldRender: true, data: ["red", "green", "blue"] });
-```
-
-##### Directive Support Matrix
-
-|Directive Name|Support|
-|-|-|
-|[`children`](https://www.fast.design/docs/fast-element/using-directives#the-children-directive)|[]()|
-|[`ref`](https://www.fast.design/docs/fast-element/using-directives#the-ref-directive)|[]()|
-|`render`|[]()|
-|[`repeat`](https://www.fast.design/docs/fast-element/using-directives#the-repeat-directive)|[]()|
-|[`slotted`](https://www.fast.design/docs/fast-element/using-directives#the-slotted-directive)|[]()|
-|[`when`](https://www.fast.design/docs/fast-element/using-directives#the-when-directive)|[]()|
-
-> Unsupported directives are no-ops. To understand more about why, see the [Design Philosophy.](#design-philosophy)
-
-##### Rendering Custom Directives
-`@microsoft/fast-element` supports creating custom directives, and `@microsoft/fast-ssr` supports *rendering*
-those custom directives by associating a SSR *renderer* to the custom directive.
-
-> This section does not cover *creating* a FAST directives - that documentation is coming to fast-element.
-
-With your directive (`MyDirective`) created, create a `ViewBehaviorFactoryRenderer` using the Directive
-
-```ts
-const MyDirectiveRenderer: ViewBehaviorFactoryRenderer = {
- // Instructs the TemplateRenderer to use this renderer when instances of
- // 'MyDirective' are found in a template
- matches: MyDirective,
- *render(directive, renderInfo, source, templateRenderer, context) {
- // Yield something, or do nothing
- }
-}
-```
-
-What a custom directive should *do* on the server depends highly on the scenario. As discussed above, several FAST directives are no-ops because the use-case doesn't make sense in an SSR context. The `render()` function is provided the directive instance, the SSR renderInfo object, any source data, the `TemplateRenderer`, and the `ExecutionContext` - use these to render what makes sense for the custom directive.
-
-To use the custom renderer, you must configure `fastSSR`:
-```ts
-import fastSSR from "@microsoft/fast-ssr";
-
-const { templateRenderer} = fastSSR({viewBehaviorFactoryRenderers: [MyDirectiveRenderer]});
-```
-
-Then, templates that use `MyDirective` can be rendered:
-
-```ts
-templateRenderer.render(html``);
-```
-#### Rendering Asynchronous Components
-Sometimes it is necessary for a component to do asynchronous work prior to rending it's template, and `@microsoft/fast-ssr` can be configured to support async work by supplying the `renderMode: "async"` configuration to the SSR factory:
-
-```ts
-import fastSSR from "@microsoft/fast-ssr";
-
-const { templateRenderer } = fastSSR({
- renderMode: "async"
-});
-```
-
-Communication that an element requires asynchronous rendering is facilitated by the [PendingTask](https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/pending-task.md) community protocol. The component should emit a `PendingTaskEvent` during it's `connectedCallback()`. Doing so instructs the `TemplateRenderer` to resolve all pending tasks before continuing rendering:
-```ts
-import { PendingTaskEvent } from "@microsoft/fast-element/pending-task";
-// ...
-class AsyncElement extends FASTElement {
- async doWork() {
- // ...
- }
-
- connectedCallback() {
- super.connectedCallback();
-
- this.dispatchEvent(new PendingTaskEvent(this.doWork()));
- }
-}
-```
-
-When yielding the results of an async renderer, ensure that any `Promise` encountered is awaited:
-
-```ts
-
-for await (const part of templateRenderer.render(someAsyncTemplate)) {
- res.write(part);
-}
-```
-
-> It's important to note that to accurately render asynchronous components, template rendering must be effectively paused until async work is complete. This is inherently inefficient because that work gets initiated iteratively, during template rendering. If possible, it is best to architect your components and application in such a way that async work happens prior to template rendering, where initiation of async work can be better coordinated.
-
-#### Disabling Rendering for Specific Components
-In cases where an author doesn't want a FAST component to render in SSR environments, but it is impractical to prevent *defining* that element in the custom element registry, the `ElementRenderer` exposes a mechanism to prevent matching elements it would otherwise match. Components can be disabled by tag-name (`"element-name"`), class constructor (`class MyElement extends FASTElement {}`), or `FASTElementDefinition` (`MyElement.compose({/* config */})`)
-
-```ts
-// The element gets defined somewhere in an application
-const name = "my-element";
-class MyElement extends FASTElement {}
-const definition = MyElement.compose({name, template: html`
Hello world
`});
-definition.define();
-
-
-const { templateRenderer, ElementRenderer } = fastSSR();
-ElementRenderer.disable("my-element");
-// or
-// ElementRenderer.disable(MyElement);
-// or
-// ElementRenderer.disable(definition);
-
-// Does not render template contents of the custom element
-templateRenderer.render(html``);
-```
-
-### Hydration
-#### `defer-hydration` Attribute
-The `defer-hydration` attribute is an attribute that indicates to client-side code that the element should not hydrate it's view. When the attribute is removed, the element is free to hydrate itself.
-
-The SSR renderer can be configured to emit the `defer-hydration` attribute to all FAST custom elements:
-```ts
-const { templateRenderer } = fastSSR({deferHydration: true});
-```
-
-> For more information on this community-protocol, see https://github.com/webcomponents-cg/community-protocols/pull/15
-#### Configuring FAST-Element
-`@microsoft/fast-element` must be configured to respect the `defer-hydration` attribute. To do this, simply import the install code into the client-side application before defining the custom elements:
-```ts
-import "@microsoft/fast-element/install-element-hydration";
-
-// Define custom elements
-```
-
-Alternatively, the `HydratableElementController` can be imported and installed manually:
-
-```ts
-import { HydratableElementController } from "@microsoft/fast-element/element-hydration";
-
-HydratableElementController.install();
-```
-
-After you do this, `@microsoft/fast-element` will wait until the `defer-hydration` attribute is removed (if present during connection) before doing connection work like rendering templates, applying stylesheets, and binding behaviors.
-
-### Configuring the RenderInfo Object
-`TemplateRenderer.render()` must be invoked with a `RenderInfo` object. Its purpose is to provide different element renderers to the process, as well as metadata about the rendering process. It can be used to render custom elements from different templating libraries in the same process. By default, `TemplateRenderer.render()` will create a `RenderInfo` object for you, but you can also easily construct your own using `TemplateRenderer.createRenderInfo()`:
-
-```js
-const { templateRenderer, ElementRenderer } = fastSSR();
-templateRenderer.render(html``, templateRenderer.createRenderInfo());
-```
-
-By default, `TemplateRenderer.createRenderInfo()` returns a `RenderInfo` object hydrated with only the `ElementRenderer` returned from `fastSSR()`. To configure this method to return a `RenderInfo` with *additional* or *different* elementRenderers, use the `TemplateRenderer.withDefaultElementRenderers()` method:
-
-```ts
- import { AnotherElementRenderer } from "somewhere";
- const { templateRenderer, ElementRenderer } = fastSSR();
-
- templateRenderer.withDefaultElementRenderers(ElementRenderer, AnotherElementRenderer);
-
- const renderInfo = templateRenderer.createRenderInfo();
- renderInfo.elementRenderers.includes(ElementRenderer); // true
- renderInfo.elementRenderers.includes(AnotherElementRenderer); // true
-```
-
-To render elements built with another library, that library will need to provide an `ElementRenderer` for the library. For example, to render a Lit element along-side a FAST element, provide the FAST `ElementRenderer` *and* the Lit `ElementRenderer` to the `RenderInfo` object. There are two ways to accomplish this. First, the `templateRenderer` itself can be configured to always create `RenderInfo` objects using both renderers:
-
-```ts
-import fastSSR from "@microsoft/fast-ssr";
-import { html } from "@microsoft/fast-element";
-import { LitElementRenderer } from "@lit-labs/ssr/lib/lit-element-renderer.js"
-
-const { templateRenderer, ElementRenderer } = fastSSR();
-
-templateRenderer.withDefaultElementRenderers(ElementRenderer, LitElementRenderer);
-// Some implementation that defines both FAST and Lit components
-defineComponents();
-
-const result = templateRenderer.render(html`
-
-
-`);
-```
-
-Alternatively, a `RenderInfo` can be created with both renderers for only a single rendering process:
-```ts
-// ...
-import fastSSR from "@microsoft/fast-ssr";
-import { html } from "@microsoft/fast-element";
-import { LitElementRenderer } from "@lit-labs/ssr/lib/lit-element-renderer.js"
-
-const { templateRenderer, ElementRenderer } = fastSSR();
-
-// Some implementation that defines both FAST and Lit components
-defineComponents();
-
-const result = templateRenderer.render(html`
-
-
-`, templateRenderer.createRenderInfo([ElementRenderer, LitElementRenderer]));
-```
-
-
-### Scoping Requests
-
-The SSR renderer can be used in a variety of contexts, one of the most common being a web server. In the web server context, it's important to keep data scoped to the context of an individual request. The easiest way to do this is to use the W3C Context protocol to inject data and services into web components combined with FAST's `RequestStorage` mechanism.
-
-`RequestStorage` and `RequestStorageManager` provide a way to execute web server response handlers with per-request scoped Context. This can be set up for any web server framework, but FAST provides a simple helper for Express-compatible middleware. Here's a quick sample of how to configure middleware for per-request scoped DOM globals and Context.
-
-```ts
-import fastSSR, { RequestStorageManager } from "@microsoft/fast-ssr";
-import express from "express";
-
-const app = express();
-const port = 8080;
-const { templateRenderer } = fastSSR();
-
-defineWebComponents();
-const template = pageTemplate();
-
-// set up per-request DOM globals and storage
-app.use(RequestStorageManager.middleware());
-
-app.get("/", (req, res) => {
- // This is running in the scoped context.
- // You can provide context instances here
- // and they will be scoped to the request
- // handler and cleaned up afterward.
-
- const stream = templateRenderer.render(template);
-
- for (const part of stream) {
- res.write(part);
- }
-
- res.end();
-});
-
-app.listen(port, () => {
- console.log(`Listening on port ${port}`);
-});
-```
-
-If working with a different framework not compatible with Express middleware, you can use the `RequestStorageManager` APIs to create custom middleware or set up individual requests. First, install the per-request DOM shim when setting up your web server:
-
-```ts
-RequestStorageManager.installDOMShim();
-```
-
-Then, at the beginning of each request or in your middleware, create the backing storage for the request:
-
-```ts
-const storage = RequestStorageManager.createStorage();
-```
-
-Finally, you must run the request handler function using the `RequestStorageManager` as follows:
-
-```ts
-RequestStorageManager.run(storage, requestHandler);
-```
\ No newline at end of file
diff --git a/packages/fast-ssr/api-extractor.json b/packages/fast-ssr/api-extractor.json
deleted file mode 100644
index ac17966c256..00000000000
--- a/packages/fast-ssr/api-extractor.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "extends": "../../api-extractor.json",
- "mainEntryPointFilePath": "./dist/dts/exports.d.ts",
- "dtsRollup": {
- "enabled": true,
- "untrimmedFilePath": "./dist/fast-ssr.untrimmed.d.ts",
- "betaTrimmedFilePath": "./dist/fast-ssr.d.ts"
- }
-}
\ No newline at end of file
diff --git a/packages/fast-ssr/biome.json b/packages/fast-ssr/biome.json
deleted file mode 100644
index b9e7bc794a5..00000000000
--- a/packages/fast-ssr/biome.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "root": false,
- "extends": "//"
-}
diff --git a/packages/fast-ssr/docs/api-report.api.md b/packages/fast-ssr/docs/api-report.api.md
deleted file mode 100644
index 5be286c839e..00000000000
--- a/packages/fast-ssr/docs/api-report.api.md
+++ /dev/null
@@ -1,196 +0,0 @@
-## API Report File for "@microsoft/fast-ssr"
-
-> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
-
-```ts
-
-///
-
-import { Aspected } from '@microsoft/fast-element';
-import { AsyncLocalStorage } from 'async_hooks';
-import { Constructable } from '@microsoft/fast-element';
-import { Disposable as Disposable_2 } from '@microsoft/fast-element';
-import { DOMContainer } from '@microsoft/fast-element/di.js';
-import { EventEmitter } from 'node:events';
-import { ExecutionContext } from '@microsoft/fast-element';
-import { FASTElement } from '@microsoft/fast-element';
-import { FASTElementDefinition } from '@microsoft/fast-element';
-import { HostController } from '@microsoft/fast-element';
-import { ViewBehaviorFactory } from '@microsoft/fast-element';
-import { ViewTemplate } from '@microsoft/fast-element';
-
-// @beta (undocumented)
-export interface AsyncElementRenderer extends Omit {
- // (undocumented)
- renderAttributes(): IterableIterator>;
- // (undocumented)
- renderShadow(renderInfo: RenderInfo): IterableIterator>;
-}
-
-// @beta (undocumented)
-export interface AsyncTemplateRenderer extends EventEmitter {
- // (undocumented)
- createRenderInfo(): RenderInfo;
- // (undocumented)
- readonly emitHydratableMarkup: boolean;
- // (undocumented)
- render(template: ViewTemplate | string, renderInfo?: RenderInfo, source?: unknown, context?: ExecutionContext): IterableIterator>;
- // (undocumented)
- withDefaultElementRenderers(...renderers: ConstructableElementRenderer[]): void;
-}
-
-// @beta (undocumented)
-export interface ConstructableElementRenderer {
- // (undocumented)
- new (tagName: string, renderInfo: RenderInfo): T;
- // Warning: (ae-forgotten-export) The symbol "AttributesMap" needs to be exported by the entry point exports.d.ts
- matchesClass(ctor: typeof HTMLElement, tagName: string, attributes: AttributesMap): boolean;
-}
-
-// @beta (undocumented)
-export interface ConstructableFASTElementRenderer extends ConstructableElementRenderer {
- disable(...args: Array): void;
-}
-
-// @beta
-export const DeclarativeShadowDOMPolyfill: Readonly<{
- undefinedElementStyles: string;
- nonStreamingTemplateUpgrade: string;
-}>;
-
-// @beta (undocumented)
-export interface ElementRenderer {
- // (undocumented)
- attributeChangedCallback(name: string, prev: string | null, next: string | null): void;
- // (undocumented)
- connectedCallback(): void;
- // (undocumented)
- disconnectedCallback(): void;
- // (undocumented)
- dispatchEvent(event: Event): boolean;
- // (undocumented)
- renderAttributes(): IterableIterator;
- // (undocumented)
- renderShadow(renderInfo: RenderInfo): IterableIterator;
- // (undocumented)
- setAttribute(name: string, value: string): void;
- // (undocumented)
- setProperty(name: string, value: unknown): void;
- // (undocumented)
- readonly tagName: string;
-}
-
-// @beta (undocumented)
-function fastSSR(): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-
-// @beta (undocumented)
-function fastSSR(config: Omit): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-
-// @beta (undocumented)
-function fastSSR(config: SSRConfiguration & Record<"renderMode", "sync">): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-
-// @beta (undocumented)
-function fastSSR(config: SSRConfiguration & Record<"renderMode", "async">): {
- templateRenderer: AsyncTemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-export default fastSSR;
-
-// @beta
-export type Middleware = (req: any, res: any, next: () => any) => void;
-
-// @beta (undocumented)
-export interface RenderInfo extends Disposable_2 {
- // @deprecated
- customElementHostStack: ElementRenderer[];
- customElementInstanceStack: ElementRenderer[];
- elementRenderers: ConstructableElementRenderer[];
- renderedCustomElementList: ElementRenderer[];
-}
-
-// @beta
-export const RequestStorage: Readonly<{
- readonly container: DOMContainer;
- set(key: any, value: any): any;
- get: typeof getItem;
- clear(): void;
- delete(key: any): boolean;
- has(key: any): boolean;
-}>;
-
-// @beta
-export const RequestStorageManager: Readonly<{
- backend: AsyncLocalStorage;
- installDOMShim(): void;
- uninstallDOMShim(): void;
- installDIContextRequestStrategy(): void;
- createStorage(options?: StorageOptions, req?: any): Map;
- run(storage: Map, callback: () => T): T;
- middleware(options?: StorageOptions): Middleware;
-}>;
-
-// @beta
-export interface SSRConfiguration {
- deferHydration?: boolean | ((tagName: string) => boolean);
- emitHydratableMarkup?: boolean;
- renderMode?: "sync" | "async";
- styleRenderer?: StyleRenderer;
- tryRecoverFromError?: boolean | ((e: unknown) => void);
- viewBehaviorFactoryRenderers?: ViewBehaviorFactoryRenderer[];
-}
-
-// @beta
-export type StorageOptions = {
- createWindow?: (req: any) => {
- [key: string]: unknown;
- };
- storage?: Map;
-};
-
-// @beta
-export interface StyleRenderer {
- render(styles: Set): string;
-}
-
-// Warning: (ae-forgotten-export) The symbol "TemplateCacheController" needs to be exported by the entry point exports.d.ts
-//
-// @public (undocumented)
-export const templateCacheController: TemplateCacheController;
-
-// @beta (undocumented)
-export interface TemplateRenderer extends EventEmitter {
- // (undocumented)
- createRenderInfo(): RenderInfo;
- // (undocumented)
- readonly emitHydratableMarkup: boolean;
- // (undocumented)
- render(template: ViewTemplate | string, renderInfo?: RenderInfo, source?: unknown, context?: ExecutionContext): IterableIterator;
- // (undocumented)
- withDefaultElementRenderers(...renderers: ConstructableElementRenderer[]): void;
-}
-
-// @beta
-export interface ViewBehaviorFactoryRenderer {
- matcher: Constructable;
- // Warning: (ae-forgotten-export) The symbol "DefaultTemplateRenderer" needs to be exported by the entry point exports.d.ts
- render(behaviorFactory: T, renderInfo: RenderInfo, source: any, renderer: DefaultTemplateRenderer, context: ExecutionContext): IterableIterator;
-}
-
-// Warnings were encountered during analysis:
-//
-// dist/dts/exports.d.ts:60:5 - (ae-forgotten-export) The symbol "SyncFASTElementRenderer" needs to be exported by the entry point exports.d.ts
-// dist/dts/exports.d.ts:75:5 - (ae-forgotten-export) The symbol "AsyncFASTElementRenderer" needs to be exported by the entry point exports.d.ts
-// dist/dts/request-storage.d.ts:33:5 - (ae-forgotten-export) The symbol "getItem" needs to be exported by the entry point exports.d.ts
-
-// (No @packageDocumentation comment for this package)
-
-```
diff --git a/packages/fast-ssr/package.json b/packages/fast-ssr/package.json
deleted file mode 100644
index 5a2b717e9e3..00000000000
--- a/packages/fast-ssr/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "name": "@microsoft/fast-ssr",
- "version": "1.0.0-beta.40",
- "type": "module",
- "author": {
- "name": "Microsoft",
- "url": "https://discord.gg/FcSNfg4"
- },
- "homepage": "https://www.fast.design/",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Microsoft/fast.git",
- "directory": "packages/fast-ssr"
- },
- "bugs": {
- "url": "https://github.com/Microsoft/fast/issues/new/choose"
- },
- "scripts": {
- "clean": "tsc -b --clean src",
- "build": "tsc -b src && npm run doc",
- "doc": "api-extractor run --local",
- "doc:ci": "api-extractor run",
- "prepublishOnly": "npm run clean && npm run build",
- "build-server": "tsc -b server",
- "lint": "biome-changed",
- "lint:fix": "biome-changed -- --fix",
- "pretest": "npm run build-server && npm run build",
- "test": "npm run test:node && npm run test:playwright",
- "test:node": "node scripts/run-tests.mjs",
- "test:playwright": "npm run pretest && playwright test",
- "test:chromium": "npm run pretest && playwright test --project=chromium",
- "test-server": "node server/dist/server.js"
- },
- "deprecated": "This package is deprecated. Please use @microsoft/fast-build and @microsoft/webui instead.",
- "description": "A package for rendering FAST Web Components outside the browser.",
- "main": "dist/esm/exports.js",
- "types": "dist/dts/exports.d.ts",
- "exports": {
- ".": {
- "types": "./dist/dts/exports.d.ts",
- "default": "./dist/esm/exports.js"
- },
- "./install-dom-shim.js": "./dist/esm/install-dom-shim.js",
- "./dom-shim": {
- "types": "./dist/dts/dom-shim.d.ts",
- "default": "./dist/esm/dom-shim.js"
- },
- "./request-storage.js": {
- "types": "./dist/dts/request-storage.d.ts",
- "default": "./dist/esm/request-storage.js"
- },
- "./package.json": "./package.json"
- },
- "dependencies": {
- "parse5": "^6.0.1",
- "tslib": "^2.6.3"
- },
- "peerDependencies": {
- "@microsoft/fast-element": "^2.10.4"
- },
- "devDependencies": {
- "@types/parse5": "^5.0.0",
- "@microsoft/fast-element": "^2.10.4"
- },
- "beachball": {
- "disallowedChangeTypes": [
- "major",
- "minor",
- "patch"
- ],
- "tag": "latest",
- "prereleasePrefix": "beta"
- }
-}
diff --git a/packages/fast-ssr/playwright.config.ts b/packages/fast-ssr/playwright.config.ts
deleted file mode 100644
index 0d600049552..00000000000
--- a/packages/fast-ssr/playwright.config.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { defineConfig, devices } from "@playwright/test";
-
-export default defineConfig({
- testDir: "./dist/esm",
- testMatch: "**/*.pw.spec.js",
- retries: 3,
- projects: [
- { name: "chromium", use: { ...devices["Desktop Chrome"] } },
- { name: "firefox", use: { ...devices["Desktop Firefox"] } },
- { name: "webkit", use: { ...devices["Desktop Safari"] } },
- ],
- webServer: {
- command: "npm run test-server",
- port: 8080,
- timeout: 120 * 1000,
- reuseExistingServer: false,
- },
-});
diff --git a/packages/fast-ssr/scripts/run-tests.mjs b/packages/fast-ssr/scripts/run-tests.mjs
deleted file mode 100644
index 12de7159510..00000000000
--- a/packages/fast-ssr/scripts/run-tests.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-import { globSync } from "node:fs";
-import { execSync } from "node:child_process";
-
-const files = globSync("dist/esm/**/*.spec.js", {
- exclude: ["dist/esm/**/*.pw.spec.js"],
-});
-
-execSync(`node --test ${files.join(" ")}`, { stdio: "inherit" });
diff --git a/packages/fast-ssr/server/README.md b/packages/fast-ssr/server/README.md
deleted file mode 100644
index c41dd618a80..00000000000
--- a/packages/fast-ssr/server/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Server
-This project contains the web server that playwright tests are run against. To build, run `npm run build-server`.
\ No newline at end of file
diff --git a/packages/fast-ssr/server/placeholder.png b/packages/fast-ssr/server/placeholder.png
deleted file mode 100644
index 300ae8d0766da103602bc15c6b5392e95cb43f6f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1617
zcmdUw`#aMM0LC|EgzTYmSy|^G$H|IvnOqtNv7TJcbXZO1GERs@MmSr?ZAUmudh$4K
zl~i&m$vviKYjasiW?ODwi^;~uTvi`2)@$&@b=vKJWAX_&%RE*U!guw+2iD1On|w
zd%0skATVOvv(&c*l>8zy7X*SBpxs^1rU(|s&-ufm3>Ztp%(8
z@Iz#T>FmwBi`~gEHrI3g&LXc~=Vupa#L$_Fy-ZwO*HCr|-+cdi>|j+=!h#BsWU;DF
z-zwLUk`=(ga%f;}8XK6O?=eIK1Wz>Cs)?qe+m0hGP7TmSp-PyzO=$f?>p815*Y%Ez
zyW=*xHPfmHYZ(*HIQfgzQI+T7>K8)QBdCK?S$ppWEBb(9wkZizp6u*YlY^W1sK+IG
z-))*K@3N&<`J3Xi3Ni#yA&dLMjZPM0p|V#c)PiUGp1(a~ld2@e5^4co_Tu?A35WNO
z+f#6rfb3-Gcu1k&sJ*qTG0ws3wpxFk>bjj|{gBJG_&Mw#CD}e92EG8t)Y6mqz224_
z0QI9@fMi9M)Mur$6A%KB+@T8tI|7Gra@n4M=&La
zGxqJIYs#dEM-Un^q?hk<2CTiTbFTe9uq(qN6*P(7u#
z$WGFij}w)vvCKXLnt4hsxV^Im?M?;t)W=CYqvFdTf5G?FXc)L4(ZI39F!1a9oc7J@
zKwfH=XTVlIc%gsuPey6?fYc+-+gyKYv~01ETF`8Wx_eI3ZvaJ5WWa&K2q*NoUFtY>
z&^ht!QR7)eWc9eX%>KfsmdGIC{5!V>hj2{Y6_QJx5oko{Z{yQ)aM^}^iLAv@F@0hk
z{N{BlsYW0DZB8^L?1I5YY^UCr*bB7DWk&6`5nWjz=Gy6%Pfs_rF;CSzo7A-MOl(h1
zcHAS{ayRW==Q=JK;}XdPizS&9iDk)#**Gfw=kN%OvMMHW+G_fQa?i+L^-=gv7m;!F
zIkw*n!=J*=i3rW%*YREWB@n$$6u)9gIM>YL2CET^@?G6`%a(
zrA!&BI2xBObbe4&h$|X1(XZAW6G|(5HeGk{c>5>GB!w@pd;T{vnpHk|Ah~pMkd&&Q<=VcYH2gz4BLJ6cfqh
z8aV&nocr%9&>lYS
J4ZnnB{0q?B_L%?x
diff --git a/packages/fast-ssr/server/server.ts b/packages/fast-ssr/server/server.ts
deleted file mode 100644
index 76b0e5e4a32..00000000000
--- a/packages/fast-ssr/server/server.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import fs from "fs";
-import path from "path";
-import { Readable } from "stream";
-
-import express, { Request, Response } from "express";
-
-const __dirname = path.resolve(path.dirname(""));
-const PORT = 8080;
-function handleRequest(req: Request, res: Response) {
- res.set("Content-Type", "text/html");
- const stream = (Readable as any).from("hello world");
- stream.on("readable", function (this: any) {
- let data: string;
-
- while ((data = this.read())) {
- res.write(data);
- }
- });
-
- stream.on("close", () => res.end());
- stream.on("error", (e: Error) => {
- console.error(e);
- process.exit(1);
- });
-}
-
-function handlePathRequest(
- mapPath: string,
- contentType: string,
- req: Request,
- res: Response
-) {
- res.set("Content-Type", contentType);
- fs.readFile(path.resolve(__dirname, mapPath), { encoding: "utf8" }, (err, data) => {
- const stream = (Readable as any).from(data);
- stream.on("readable", function (this: any) {
- while ((data = this.read())) {
- res.write(data);
- }
- });
- stream.on("close", () => res.end());
- stream.on("error", (e: Error) => {
- console.error(e);
- process.exit(1);
- });
- });
-}
-
-const app = express();
-app.get("/", handleRequest);
-app.get("/fast-style", (req: Request, res: Response) =>
- handlePathRequest("./src/styles/fast-style.fixture.html", "text/html", req, res)
-);
-app.get("/fast-style.js", (req: Request, res: Response) =>
- handlePathRequest(
- "./dist/esm/styles/fast-style.js",
- "application/javascript",
- req,
- res
- )
-);
-app.get("/fast-style-config.js", (req: Request, res: Response) =>
- handlePathRequest(
- "./dist/esm/styles/fast-style-config.js",
- "application/javascript",
- req,
- res
- )
-);
-app.get("/fast-command-buffer", (req: Request, res: Response) =>
- handlePathRequest(
- "./src/fast-command-buffer/index.fixture.html",
- "text/html",
- req,
- res
- )
-);
-app.get("/fast-command-buffer.js", (req: Request, res: Response) =>
- handlePathRequest(
- "./dist/esm/fast-command-buffer/index.js",
- "application/javascript",
- req,
- res
- )
-);
-app.get("/placeholder.png", (req, res) =>
- res.sendFile(path.resolve(__dirname, "./server/placeholder.png"))
-);
-app.listen(PORT);
diff --git a/packages/fast-ssr/server/tsconfig.json b/packages/fast-ssr/server/tsconfig.json
deleted file mode 100644
index fc7f3f2b6e1..00000000000
--- a/packages/fast-ssr/server/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "../tsconfig.json",
- "compilerOptions": {
- "composite": true,
- "rootDir": ".",
- "outDir": "dist"
- },
- "references": [{ "path": "../src"}]
-}
diff --git a/packages/fast-ssr/src/configure-fast-element.ts b/packages/fast-ssr/src/configure-fast-element.ts
deleted file mode 100644
index 6dbdf407faf..00000000000
--- a/packages/fast-ssr/src/configure-fast-element.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import {
- Compiler,
- ElementController,
- ElementStyles,
- Updates,
- ViewBehaviorFactory,
-} from "@microsoft/fast-element";
-import { SSRElementController } from "./element-controller.js";
-import { FASTSSRStyleStrategy } from "./styles/style-strategy.js";
-import { SSRView } from "./view.js";
-
-Compiler.setDefaultStrategy(
- (
- html: string | HTMLTemplateElement,
- factories: Record
- ) => {
- if (typeof html !== "string") {
- throw new Error(
- "SSR compiler does not support HTMLTemplateElement templates"
- );
- }
-
- return new SSRView(html, factories) as any;
- }
-);
-
-ElementStyles.setDefaultStrategy(FASTSSRStyleStrategy);
-
-// Set update mode to synchronous, so that mutations happen immediately.
-// This is required due to the synchronous nature of rendering templates
-// to a string.
-Updates.setMode(false);
-
-ElementController.setStrategy(SSRElementController);
diff --git a/packages/fast-ssr/src/declarative-shadow-dom-polyfill.ts b/packages/fast-ssr/src/declarative-shadow-dom-polyfill.ts
deleted file mode 100644
index cd233b3707d..00000000000
--- a/packages/fast-ssr/src/declarative-shadow-dom-polyfill.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-// Reference: https://web.dev/declarative-shadow-dom/
-
-/**
- * Provides style and JavaScript code snippets for polyfills related
- * to Declarative Shadow DOM (DSD).
- * @beta
- */
-export const DeclarativeShadowDOMPolyfill = Object.freeze({
- /**
- * Styles that hide undefined elements, taking account of the
- * fact that undefined elements with DSD should not be hidden.
- * @remarks
- * These styles should be used in a style element tag in the head
- * of the HTML document.
- */
- undefinedElementStyles: `:not(:defined) > template[shadowroot] ~ * {
- display: none;
-}` as string,
- /**
- * A JavaScript polyfill for DSD that recursively converts all templates
- * in the document with the shadowroot attribute into actual shadow roots.
- * @remarks
- * This is a one-time operation that should be placed at the end of the SSR'd
- * HTML but before any other scripts run.
- */
- nonStreamingTemplateUpgrade:
- `if (!HTMLTemplateElement.prototype.hasOwnProperty('shadowRoot')) {
- (function attachShadowRoots(root) {
- root.querySelectorAll("template[shadowroot]").forEach(template => {
- const mode = template.getAttribute("shadowroot");
- const shadowRoot = template.parentNode.attachShadow({ mode });
- shadowRoot.appendChild(template.content);
- template.remove();
- attachShadowRoots(shadowRoot);
- });
- })(document);
-}` as string,
-});
diff --git a/packages/fast-ssr/src/dom-shim.spec.ts b/packages/fast-ssr/src/dom-shim.spec.ts
deleted file mode 100644
index ff73206d96d..00000000000
--- a/packages/fast-ssr/src/dom-shim.spec.ts
+++ /dev/null
@@ -1,184 +0,0 @@
-import "./install-dom-shim.js";
-import { deepStrictEqual, doesNotThrow, ok, strictEqual } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { FASTElement, html } from "@microsoft/fast-element";
-import { createWindow } from "./dom-shim.js";
-import fastSSR from "./exports.js";
-import { uniqueElementName } from "@microsoft/fast-element/testing.js";
-
-describe("createWindow", () => {
- test("should create a window with a document property that is an instance of the window's Document constructor", () => {
- const window = createWindow();
-
- strictEqual(window.document instanceof (window.Document as any), true);
-
- class MyDocument {}
- const windowOverride = createWindow({ Document: MyDocument });
- strictEqual(windowOverride.document instanceof MyDocument, true);
- });
- test("should create a window with a customElements property that is an instance of the window's CustomElementRegistry constructor", () => {
- const window = createWindow();
-
- strictEqual(
- window.customElements instanceof (window.CustomElementRegistry as any)
- , true);
-
- class MyRegistry {}
- const windowOverride = createWindow({ CustomElementRegistry: MyRegistry });
- strictEqual(windowOverride.customElements instanceof MyRegistry, true);
- });
-});
-
-describe("The DOM shim", () => {
- test(`should support construction and connection of a component and template during SSR rendering`, () => {
- class MyComponent extends FASTElement {}
-
- const name = "my-component";
-
- MyComponent.define({
- name,
- template: html``
- });
-
- const { templateRenderer } = fastSSR();
- const templateString = `<${name}>${name}>`;
- doesNotThrow(() => templateRenderer.render(templateString));
- });
-
- describe("has a CSSStyleSheet implementation", () => {
- test("that is constructable", () => {
- doesNotThrow(() => new CSSStyleSheet());
- });
- test("that supports adding :host{} and :root{} rules", () => {
- const sheet = new CSSStyleSheet();
- const hostIndex = sheet.insertRule(":host{}");
- strictEqual(sheet.cssRules[hostIndex].cssText, ":host { }");
- const rootIndex = sheet.insertRule(":root{}");
- strictEqual(sheet.cssRules[rootIndex].cssText, ":root { }");
- });
-
- describe("with rule implementations", () => {
- test("that support setting properties from the style declaration", () => {
- const sheet = new CSSStyleSheet();
- const index = sheet.insertRule(":host{}");
- const rule = sheet.cssRules[index] as CSSStyleRule;
- rule.style.setProperty("--test", "value");
-
- strictEqual(rule.cssText, ":host { --test: value; }");
- });
- test("that support removing properties from the style declaration", () => {
- const sheet = new CSSStyleSheet();
- const index = sheet.insertRule(":host{}");
- const rule = sheet.cssRules[index] as CSSStyleRule;
- rule.style.setProperty("--test", "value");
- rule.style.removeProperty("--test");
-
- strictEqual(rule.cssText, ":host { }");
- });
- });
- });
-
- describe("has a matchMedia method", () => {
- test("that can returns the MediaQueryList supplied to createWindow", () => {
- class MyMediaQueryList {}
-
- const win: any = createWindow({ MediaQueryList: MyMediaQueryList });
- const list = win.matchMedia();
-
- ok(list instanceof MyMediaQueryList);
- });
- });
-
- describe("DOMTokenList", () => {
- class TestElement extends FASTElement {}
- TestElement.define({ name: uniqueElementName() });
-
- test("adds a token", () => {
- const element = new TestElement();
- const cList = element.classList;
-
- cList.toggle("c1");
- ok(cList.contains("c1"), "adds a token that is not present");
-
- deepStrictEqual(cList.toggle("c2"),
- true
- , "returns true when token is added");
- });
-
- test("removes a token", () => {
- const element = new TestElement();
- const cList = element.classList;
-
- cList.add("c1");
- cList.toggle("c1");
-
- ok(!cList.contains("c1"), "removes a token that is present");
-
- cList.add("c2");
- deepStrictEqual(
- cList.toggle("c2"), false, "return false when token is removed"
- );
- });
-
- test("adds token with second argument", () => {
- const element = new TestElement();
- const cList = element.classList;
-
- cList.toggle("c1", true);
- ok(cList.contains("c1"), "adds a token");
-
- deepStrictEqual(
- cList.toggle("c2", true), true, "returns true when token is added"
- );
-
- cList.add("c3");
- cList.toggle("c3", true);
-
- ok(
- cList.contains("c3"), "does not remove a token that is already present"
- );
-
- cList.add("c4");
-
- deepStrictEqual(
- cList.toggle("c4", true), true, "returns true when token is already present"
- );
- });
-
- test("removes token with second argument", () => {
- const element = new TestElement();
- const cList = element.classList;
-
- cList.add("c1");
- cList.toggle("c1", false);
-
- ok(!cList.contains("c1"), "removes a token");
-
- deepStrictEqual(
- cList.toggle("c2", false), false, "returns false when token is removed"
- );
-
- cList.toggle("c3", false);
-
- ok(
- !cList.contains("c3"), "does not add a token that is not present"
- );
-
- deepStrictEqual(
- cList.toggle("c4", false), false, "returns false when token was not present"
- );
- });
-
- test("removes duplicated tokens", () => {
- const element = new TestElement();
- element.className = "ho ho ho";
-
- const cList = element.classList;
- cList.remove("ho");
- ok(
- !cList.contains("ho"), "should remove all instances of 'ho'"
- );
- deepStrictEqual(element.className, "");
- });
- });
-});
diff --git a/packages/fast-ssr/src/dom-shim.ts b/packages/fast-ssr/src/dom-shim.ts
deleted file mode 100644
index 945853b50a6..00000000000
--- a/packages/fast-ssr/src/dom-shim.ts
+++ /dev/null
@@ -1,443 +0,0 @@
-/**
- * This file was heavily inspired by {@link https://github.com/lit/lit/tree/main/packages/labs/ssr} with some adjustments made.
- * Please see {@link ../ACKNOWLEDGEMENTS.md}
- */
-
-import { shouldBubble } from "./event-utilities.js";
-
-/**
- * @beta
- */
-export class Node extends EventTarget {}
-
-/**
- * @beta
- */
-export class Element extends Node {}
-
-function checkTokenAndGetIndex(classList: DOMTokenList, token: string) {
- if (token === "") {
- throw new Error("The token must not be empty.");
- }
-
- if (/\s/.test(token)) {
- throw new Error("The token must not contain space characters.");
- }
-
- return classList.indexOf(token);
-}
-
-/*
- * Based on classList.js: Cross-browser full element.classList implementation.
- * 1.2.20171210
- *
- * Credit to Eli Grey, http://eligrey.com
- * License: Dedicated to the public domain.
- * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
- */
-
-/**
- * @beta
- */
-export class DOMTokenList {
- private tokens: string[] = [];
-
- public constructor(private element: HTMLElement, private attributeName: string) {
- const trimmedClasses = (element.getAttribute(attributeName) || "").trim();
- const classes = trimmedClasses ? trimmedClasses.split(/\s+/) : [];
-
- for (let i = 0, len = classes.length; i < len; i++) {
- this.tokens.push(classes[i]);
- }
- }
-
- public item(i: number) {
- return this.tokens[i] || null;
- }
-
- public contains(token: string) {
- return ~checkTokenAndGetIndex(this, token + "");
- }
-
- public indexOf(token: string) {
- return this.tokens.indexOf(token);
- }
-
- public add(...tokens: string[]) {
- const length = tokens.length;
- let index = 0;
- let updated = false;
-
- do {
- const token = tokens[index] + "";
-
- if (!~checkTokenAndGetIndex(this, token)) {
- this.tokens.push(token);
- updated = true;
- }
- } while (++index < length);
-
- if (updated) {
- this.updateClassName();
- }
- }
-
- public remove(...tokens: string[]) {
- const length = tokens.length;
- let index = 0;
- let updated = false;
-
- do {
- const token = tokens[index] + "";
- let result = checkTokenAndGetIndex(this, token);
-
- while (~result) {
- this.tokens.splice(result, 1);
- updated = true;
- result = checkTokenAndGetIndex(this, token);
- }
- } while (++index < length);
-
- if (updated) {
- this.updateClassName();
- }
- }
-
- public toggle(token: string, force: boolean): boolean {
- const result = this.contains(token);
- const method = result ? force !== true && "remove" : force !== false && "add";
-
- if (method) {
- this[method](token);
- }
-
- if (force === true || force === false) {
- return force;
- } else {
- return !result;
- }
- }
-
- public replace(token: string, replacement: string) {
- const index = checkTokenAndGetIndex(this, token + "");
-
- if (~index) {
- this.tokens.splice(index, 1, replacement);
- this.updateClassName();
- }
- }
-
- public toString(): string {
- return this.tokens.join(" ");
- }
-
- private updateClassName() {
- this.element.setAttribute(this.attributeName, this.toString());
- }
-}
-
-/**
- * @beta
- */
-export abstract class HTMLElement extends Element {
- private static elementAttributes: WeakMap> =
- new WeakMap();
- private static getOrCreateAttributesForElement(element: HTMLElement) {
- let attrs = HTMLElement.elementAttributes.get(element);
- if (!attrs) {
- HTMLElement.elementAttributes.set(element, (attrs = new Map()));
- }
- return attrs;
- }
-
- private _shadowRoot: null | ShadowRoot = null;
-
- get attributes() {
- return Array.from(HTMLElement.getOrCreateAttributesForElement(this)).map(
- ([name, value]) => ({
- name,
- value,
- })
- );
- }
-
- get shadowRoot() {
- return this._shadowRoot;
- }
-
- get part(): DOMTokenList {
- return new DOMTokenList(this, "part");
- }
-
- get classList(): DOMTokenList {
- return new DOMTokenList(this, "class");
- }
-
- get className(): string | null {
- return this.getAttribute("class");
- }
-
- set className(value: string | null) {
- if (value === null) {
- this.removeAttribute("class");
- } else {
- this.setAttribute("class", value);
- }
- }
-
- abstract attributeChangedCallback?(
- name: string,
- old: string | null,
- value: string | null
- ): void;
-
- setAttribute(name: string, value: string) {
- HTMLElement.getOrCreateAttributesForElement(this).set(name, value);
- }
-
- removeAttribute(name: string) {
- HTMLElement.getOrCreateAttributesForElement(this).delete(name);
- }
-
- hasAttribute(name: string) {
- return HTMLElement.getOrCreateAttributesForElement(this).has(name);
- }
-
- attachShadow(init: ShadowRootInit): ShadowRoot {
- const shadowRoot = { host: this };
- if (init && init.mode === "open") {
- this._shadowRoot = shadowRoot;
- }
- return shadowRoot;
- }
-
- getAttribute(name: string) {
- const value = HTMLElement.getOrCreateAttributesForElement(this).get(name);
- return value === undefined ? null : value;
- }
-}
-
-/**
- * @beta
- */
-export interface CustomHTMLElement {
- new (): HTMLElement;
- observedAttributes?: string[];
-}
-
-/**
- * @beta
- */
-export class ShadowRoot {}
-
-/**
- * @beta
- */
-export class Document extends Node {
- public adoptedStyleSheets: ReadonlyArray = [];
- createTreeWalker() {
- return {};
- }
- createTextNode() {
- return {};
- }
- createElement() {
- return {};
- }
-
- public dispatchEvent(event: Event): boolean {
- let canceled = super.dispatchEvent(event);
-
- if (shouldBubble(event)) {
- canceled = window.dispatchEvent(event);
- }
-
- return canceled;
- }
-}
-
-/**
- * @beta
- */
-export class CustomEvent extends Event {
- public detail: T | null = null;
- constructor(type: string, init?: CustomEventInit) {
- super(type, init);
-
- if (init && "detail" in init) {
- this.detail = init.detail as T;
- }
- }
-}
-
-/**
- * @beta
- */
-export class CSSStyleRule {
- public selectorText: string | undefined;
- public readonly style = new CSSStyleDeclaration();
-
- public get cssText(): string {
- if (typeof this.selectorText !== "string") {
- throw new Error(
- "Cannot format cssText for CSSStyleRule. No selectorText property is assigned."
- );
- }
-
- return `${this.selectorText} { ${this.style.cssText} }`;
- }
-}
-
-/**
- * @beta
- */
-export class CSSStyleDeclaration {
- private rules = new Map();
- public setProperty(name: string, value: string = "") {
- this.rules.set(name, value);
- }
- public removeProperty(name: string) {
- this.rules.delete(name);
- }
-
- public get cssText() {
- let text = "";
-
- for (const [key, value] of this.rules) {
- text += `${key}: ${value};`;
- }
-
- return text;
- }
-}
-
-/**
- * @beta
- */
-export class CSSStyleSheet {
- replace() {}
- public readonly cssRules: CSSRule[] = [];
- insertRule(rule: string, index: number = 0) {
- const selectorText = rule.split("{")[0];
- const styleRule = new window.CSSStyleRule();
- styleRule.selectorText = selectorText;
- this.cssRules.splice(index, 0, styleRule);
-
- return index;
- }
-}
-
-/**
- * @beta
- */
-export type CustomElementRegistration = {
- ctor: { new (): HTMLElement };
- observedAttributes: string[];
-};
-
-/**
- * @beta
- */
-export class CustomElementRegistry {
- private __definitions = new Map();
-
- define(name: string, ctor: CustomHTMLElement) {
- this.__definitions.set(name, {
- ctor,
- observedAttributes: (ctor as CustomHTMLElement).observedAttributes ?? [],
- });
- }
-
- get(name: string) {
- const definition = this.__definitions.get(name);
- return definition && definition.ctor;
- }
-}
-
-/**
- * @beta
- */
-export class MutationObserver {
- observe() {}
-}
-
-/**
- * Shim of MediaQueryList.
- * {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList} */
-export class MediaQueryList {
- /** No-op */
- addEventListener() {}
-
- /** No-op */
- removeEventListener() {}
-
- /** Always false */
- matches = false;
-}
-
-/**
- * @beta
- */
-export class Window extends EventTarget {
- public Node = Node;
- public Element = Element;
- public HTMLElement = HTMLElement;
- public Document = Document;
- public CustomEvent = CustomEvent;
- public CSSStyleSheet = CSSStyleSheet;
- public CSSStyleDeclaration = CSSStyleDeclaration;
- public CSSStyleRule = CSSStyleRule;
- public ShadowRoot = ShadowRoot;
- public CustomElementRegistry = CustomElementRegistry;
- public MutationObserver = MutationObserver;
- public MediaQueryList = MediaQueryList;
- public matchMedia = () => new this.MediaQueryList();
-
- // Defined in constructor
- public window: unknown;
- public document: unknown;
- public customElements: unknown;
- public dispatchEvent: any;
- public addEventListener: any;
- public removeEventListener: any;
-
- constructor(props?: Record) {
- super();
-
- /**
- * Methods of EventTarget must be assigned explicitly, otherwise they get omitted
- * when the window is merged into the `globalThis` in {@link installWindowOnGlobal}.
- */
- this.dispatchEvent = EventTarget.prototype.dispatchEvent.bind(this);
- this.addEventListener = EventTarget.prototype.addEventListener.bind(this);
- this.removeEventListener = EventTarget.prototype.removeEventListener.bind(this);
-
- Object.assign(this, props);
- this.window = this;
- this.document = new this.Document();
- this.customElements = new this.CustomElementRegistry();
- }
-}
-
-/**
- * Creates a window object.
- * @param props - Additional properties to expose on the window.
- *
- * @beta
- */
-export function createWindow>(props?: T): Window & T {
- return new Window(props) as Window & T;
-}
-
-/**
- * Installs a window object on the global, exposing properties directly on globalThis and globalthis.window
- * @param window - The Window object to install
- *
- * @beta
- */
-export function installWindowOnGlobal(window: Record) {
- if (globalThis.window === undefined) {
- Object.assign(globalThis, window);
- globalThis.window = globalThis as any;
- }
-}
diff --git a/packages/fast-ssr/src/element-controller.ts b/packages/fast-ssr/src/element-controller.ts
deleted file mode 100644
index b12dd9390ac..00000000000
--- a/packages/fast-ssr/src/element-controller.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { ElementController } from "@microsoft/fast-element";
-
-export class SSRElementController extends ElementController {
- disconnect(): void {
- super.disconnect();
-
- // remove all behaviors to avoid memory leak
- if (this.behaviors !== null) {
- for (const [behavior] of this.behaviors) {
- this.removeBehavior(behavior, true);
- }
- }
- }
-}
diff --git a/packages/fast-ssr/src/element-renderer/element-renderer.spec.ts b/packages/fast-ssr/src/element-renderer/element-renderer.spec.ts
deleted file mode 100644
index 7bc92b5cfd0..00000000000
--- a/packages/fast-ssr/src/element-renderer/element-renderer.spec.ts
+++ /dev/null
@@ -1,551 +0,0 @@
-import "../install-dom-shim.js";
-
-import { deepStrictEqual, doesNotThrow, ok, strictEqual, throws } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { attr, css, customElement, FASTElement, html, observable, when } from "@microsoft/fast-element";
-import { PendingTaskEvent } from "@microsoft/fast-element/pending-task.js";
-import { uniqueElementName } from "@microsoft/fast-element/testing.js";
-import fastSSR from "../exports.js";
-import { consolidate, consolidateAsync } from "../test-utilities/consolidate.js";
-import { SyncFASTElementRenderer } from "./fast-element-renderer.js";
-
-@customElement({
- name: "bare-element",
-})
-export class BareElement extends FASTElement {}
-@customElement({
- name: "styled-element",
- styles: css`:host { display: block; }${css`:host { color: red; }`}
- `
-})
-export class StyledElement extends FASTElement {}
-@customElement({
- name: "host-binding-element",
- template: html`
- true}">
- `
-})
-export class HostBindingElement extends FASTElement {}
-
-describe("FallbackRenderer", () => {
- // Define custom element that is not a FAST elmeent.
- const name = uniqueElementName();
- customElements.define(name, class extends HTMLElement{});
- describe("rendering an element with attributes", () => {
- test("should not render the attribute when binding evaluates null", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} attr="${x => null}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} >${name}>
- `);
- });
-
- test("should not render the attribute when the binding evaluates undefined", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} attr="${x => undefined}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} >${name}>
- `);
- });
-
- test("should render a boolean attribute with the values of true or false", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} ?attr="${x => true}">${html.partial(name)}>
- <${html.partial(name)} ?attr="${x => false}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} attr>${name}>
- <${name} >${name}>
- `);
- });
-
- test("should render a non-boolean attribute with the values of true or false", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} aria-expanded="${x => true}">${html.partial(name)}>
- <${html.partial(name)} aria-expanded="${x => false}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} aria-expanded="true">${name}>
- <${name} aria-expanded="false">${name}>
- `);
- });
-
- test("should render an attribute with the value of a number", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} number="${x => 12}">${html.partial(name)}>
- <${html.partial(name)} number="${x => NaN}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} number="12">${name}>
- <${name} number="NaN">${name}>
- `);
- });
-
- test("should render an attribute with a string value", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- <${html.partial(name)} attr="${x => 'my-str-value'}">${html.partial(name)}>
- `));
- strictEqual(result, `
- <${name} attr="my-str-value">${name}>
- `);
- });
-
- test("should throw error when rendering an attribute with an object value", () => {
- const { templateRenderer } = fastSSR();
-
- throws(() => {
- consolidate(templateRenderer.render(html`<${html.partial(name)} attr="${x => ({ key: 'my-value' })}">${html.partial(name)}>`));
- })
- });
- });
-});
-
-describe("FASTElementRenderer", () => {
- describe("should have a 'matchesClass' method", () => {
- test("that returns true when invoked with a class that extends FASTElement ", () => {
- class MyElement extends FASTElement {}
- strictEqual(SyncFASTElementRenderer.matchesClass(MyElement, "", new Map()), true);
- });
- test("that returns false when invoked with a class that does not extend FASTElement ", () => {
- class MyElement extends HTMLElement {}
- strictEqual(SyncFASTElementRenderer.matchesClass(MyElement, "", new Map()), false);
- });
-
- test("should return false when the provided class has been disabled", () => {
- class MyElement extends FASTElement {}
- const { ElementRenderer } = fastSSR();
-
- ElementRenderer.disable(MyElement);
-
- strictEqual(ElementRenderer.matchesClass(MyElement, "", new Map()), false)
- });
- test("should return false when the provided tag-name has been disabled", () => {
- const name = uniqueElementName();
- class MyElement extends FASTElement {}
- const { ElementRenderer } = fastSSR();
-
- ElementRenderer.disable(name);
-
- strictEqual(ElementRenderer.matchesClass(MyElement, name, new Map()), false)
- });
- test("should return false when the provided element definition has been disabled", () => {
- const name = uniqueElementName();
- class MyElement extends FASTElement {}
- const definition = MyElement.compose(name);
- const { ElementRenderer } = fastSSR();
-
- ElementRenderer.disable(definition);
-
- strictEqual(ElementRenderer.matchesClass(MyElement, name, new Map()), false)
- });
- });
-
- describe("rendering stylesheets", () => {
- test(`should render stylesheets as 'style' elements by default`, () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``);
- });
- test.skip(`should render stylesheets as 'fast-style' elements when configured`, () => {
- const { templateRenderer } = fastSSR(/* Replace w/ configuration when fast-style work is complete{useFASTStyle: true}*/);
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``);
- });
- });
-
- describe("with host bindings", () => {
- test("should render attributes on the root of a template element to the host element", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
- `));
- strictEqual(result, `
-
- `);
- });
-
- test("should not evaluate event bindings on the host", () => {
- const { templateRenderer } = fastSSR();
- const name = uniqueElementName();
- FASTElement.define({name , template: html` {throw new Error("Event bindings should not be invoked")}}>`});
-
- doesNotThrow(() => {
- consolidate(templateRenderer.render(`<${name}>${name}>`));
- })
- });
- })
-
- describe("rendering an element with attributes", () => {
- test("should not render the attribute when binding evaluates null", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
- `));
- strictEqual(result, `
-
- `);
- });
- test("should not render the attribute when the binding evaluates undefined", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
- `));
- strictEqual(result, `
-
- `);
- });
-
- test("should render a boolean attribute with the values of true or false", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
- true}">
- false}">
- `));
- strictEqual(result, `
-
-
- `);
- });
-
- test("should render a non-boolean attribute with the values of true or false", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
-
- `));
- strictEqual(result, `
-
-
- `);
- });
-
- test("should render an attribute with the value of a number", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
-
- `));
- strictEqual(result, `
-
-
- `);
- });
-
- test("should render an attribute with a string value", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`
-
- `));
- strictEqual(result, `
-
- `);
- });
-
- test("should throw error when rendering an attribute with an object value", () => {
- const { templateRenderer } = fastSSR();
- try {
- consolidate(templateRenderer.render(html``));
- } catch (error) {
- deepStrictEqual(error, new Error("Cannot assign attribute 'attr' for element bare-element."));
- }
- });
- });
-
- describe("emitting events", () => {
-
- @customElement("test-event-dispatch")
- class TestEventDispatch extends FASTElement {
- @attr({attribute: "event-detail"})
- eventDetail: string = "";
-
- @attr({ attribute: "listen-self", mode: "boolean"})
- listenSelf: boolean = false;
-
- @attr({ attribute: "stop-immediate-prop", mode: "boolean"})
- stopImmediateProp: boolean = false;
-
- @attr({ attribute: "stop-prop", mode: "boolean"})
- stopProp: boolean = false;
-
- connectedCallback(): void {
- super.connectedCallback();
- const e = new CustomEvent<{ data: string }>("test-event", {bubbles: true, detail: { data: ""}})
-
- if (this.listenSelf) {
- this.addEventListener("test-event", (e: any) => {
- e.detail.data = "listen-self-success";
- e.stopPropagation();
- });
- }
-
- if (this.stopProp) {
- this.addEventListener("test-event", (e: any) => {
- e.detail.data = "stop-prop-success";
- e.stopPropagation();
- });
- }
- if (this.stopImmediateProp) {
- this.addEventListener("test-event", (e: any) => {
- e.detail.data = "stop-immediate-prop-success";
- e.stopImmediatePropagation();
- });
- this.addEventListener("test-event", (e: any) => {
- e.detail.data = "stop-immediate-prop-failure";
- });
- }
-
- this.dispatchEvent(e);
-
- this.eventDetail = e.detail.data || "";
- }
- }
-
- @customElement("test-event-listener")
- class TestEventListener extends FASTElement {
- @attr
- data: string = "default"
-
- connectedCallback() {
- super.connectedCallback();
- this.addEventListener("test-event", (e: Event) => {
- ( e as CustomEvent<{ data: string }> ).detail.data = this.data;
- })
- }
- }
- test("An element dispatching an event should get it's own handler fired", () => {
- const { templateRenderer } = fastSSR();
- const result = consolidate(templateRenderer.render(html`` ));
- strictEqual(result, ``)
- });
- test("An ancestor with a handler should get it's handler invoked if the event bubbles", () => {
- const { templateRenderer } = fastSSR();
-
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``)
- });
- test("Should bubble events to the document", () => {
- document.addEventListener("test-event", (e) => {
- (e as any).detail.data = "document-success";
- });
- const { templateRenderer } = fastSSR();
-
- const result = consolidate(templateRenderer.render(html``));
-
- strictEqual(result, ``);
- });
- test("Should bubble events to the window", () => {
- window.addEventListener("test-event", (e) => {
- (e as any).detail.data = "window-success";
- });
- const { templateRenderer } = fastSSR();
-
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``);
- });
- test("Should not bubble an event that invokes event.stopImmediatePropagation()", () => {
- const { templateRenderer } = fastSSR();
-
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``)
- });
- test("Should not bubble an event that invokes event.stopPropagation()", () => {
- const { templateRenderer } = fastSSR();
-
- const result = consolidate(templateRenderer.render(html``));
- strictEqual(result, ``)
- });
- });
-
- describe("rendering asynchronously", () => {
- test("should support attribute mutation for the element as a result of PendingTask events", async () => {
- const name = uniqueElementName();
- @customElement({
- name,
- })
- class MyElement extends FASTElement {
- connectedCallback(): void {
- super.connectedCallback();
- this.dispatchEvent(new PendingTaskEvent(new Promise((resolve) => {
- window.setTimeout(() => {
- this.setAttribute("async-resolved", "");
- resolve();
- }, 20);
- })));
- }
- }
-
- const template = html`<${html.partial(name)}>${html.partial(name)}>`;
- const { templateRenderer } = fastSSR({renderMode: "async"});
-
- strictEqual(await consolidateAsync(templateRenderer.render(template)), `<${name} async-resolved>${name}>`)
- });
-
-
- test("should throw when the element catches rejected PendingTaskEvents", async () => {
- const name = uniqueElementName();
- @customElement({
- name,
- })
- class MyElement extends FASTElement {
- connectedCallback(): void {
- super.connectedCallback();
- this.dispatchEvent(new PendingTaskEvent(new Promise((resolve, reject) => {
- window.setTimeout(() => {
- this.setAttribute("async-reject", "");
- reject(new Error());
- }, 20);
- })));
- }
- }
-
- const template = html`<${html.partial(name)}>${html.partial(name)}>`;
- const { templateRenderer } = fastSSR({renderMode: "async"});
- try {
- await consolidateAsync(templateRenderer.render(template))
- strictEqual("didn't error", "errored");
- } catch(e) {
- strictEqual("errored", "errored");
- }
- });
- test("should await multiple PendingTaskEvents", async () => {
- const name = uniqueElementName();
- @customElement({
- name,
- })
- class MyElement extends FASTElement {
- connectedCallback(): void {
- super.connectedCallback();
- this.dispatchEvent(new PendingTaskEvent(new Promise((resolve) => {
- window.setTimeout(() => {
- this.setAttribute("async-resolved-one", "");
- resolve();
- }, 20);
- })));
- this.dispatchEvent(new PendingTaskEvent(new Promise((resolve) => {
- window.setTimeout(() => {
- this.setAttribute("async-resolved-two", "");
- resolve();
- }, 30);
- })));
- }
- }
-
- const template = html`<${html.partial(name)}>${html.partial(name)}>`;
- const { templateRenderer } = fastSSR({renderMode: "async"});
-
- strictEqual(await consolidateAsync(templateRenderer.render(template)), `<${name} async-resolved-one async-resolved-two>${name}>`)
- });
- test("should render template content only displayed after PendingTaskEvent is resolved", async () => {
- const name = uniqueElementName();
- @customElement({
- name,
- template: html`${when(x => x.renderContent, html`
${name}>`)
- })
- });
-
- test("should match FAST elements that extend base-classes created from `FASTElement.from()`", () => {
- const BaseClass = FASTElement.from(HTMLElement);
- class MyElement extends BaseClass {}
-
- const name = uniqueElementName();
- FASTElement.define(MyElement, name);
-
- const { ElementRenderer } = fastSSR();
-
- strictEqual(ElementRenderer.matchesClass(MyElement, name, new Map()), true)
- })
-
- describe("with hydration markup enabled", () => {
- test("should emit the 'needs-hydration' attribute from `renderAttributes()`", () => {
- const { ElementRenderer, templateRenderer } = fastSSR({ emitHydratableMarkup: true});
- const name = uniqueElementName();
-
- FASTElement.define(name);
- const renderer = new ElementRenderer(name, templateRenderer.createRenderInfo());
-
- ok(consolidate(renderer.renderAttributes()).split(" ").includes("needs-hydration"));
- });
- })
-});
diff --git a/packages/fast-ssr/src/element-renderer/element-renderer.ts b/packages/fast-ssr/src/element-renderer/element-renderer.ts
deleted file mode 100644
index d8946a34406..00000000000
--- a/packages/fast-ssr/src/element-renderer/element-renderer.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * This file was ported from {@link https://github.com/lit/lit/tree/main/packages/labs/ssr}.
- * Please see {@link ../ACKNOWLEDGEMENTS.md}
- */
-import { DOM, observable } from "@microsoft/fast-element";
-import { RenderInfo } from "../render-info.js";
-import { escapeHtml } from "../escape-html.js";
-import { HTMLElement as ShimHTMLElement } from "../dom-shim.js";
-import { shouldBubble } from "../event-utilities.js";
-import { AttributesMap, ElementRenderer } from "./interfaces.js";
-
-/**
- * @beta
- */
-export abstract class DefaultElementRenderer
- implements Omit
-{
- private parent: ElementRenderer | null = null;
- private restoreElementDispatchEvent: (() => void) | null = null;
- @observable
- abstract element?: HTMLElement;
- elementChanged() {
- this.restoreElementDispatchEvent?.();
- if (this.element) {
- const element = this.element;
- const dispatch = element.dispatchEvent;
- Reflect.defineProperty(element, "dispatchEvent", {
- value: (event: Event) => {
- let canceled = dispatch.call(element, event);
-
- if (shouldBubble(event)) {
- if (this.parent) {
- canceled = this.parent.dispatchEvent(event);
- } else if (element instanceof ShimHTMLElement) {
- // Only emit on document if the the element is the DOM shim's element.
- // Otherwise, the installed DOM should implement it's own behavior for bubbling
- // an event from an element to the document and window.
- canceled = document.dispatchEvent(event);
- }
- }
-
- return canceled;
- },
- });
- this.restoreElementDispatchEvent = () => {
- Reflect.defineProperty(element, "dispatchEvent", {
- value: dispatch,
- });
- this.restoreElementDispatchEvent = null;
- };
- }
- }
-
- /**
- * Should return true when the renderer should handle rendering for a custom element ctor or tag name.
- * @param ctor - the custom element class
- * @param tagName - the custom element tag name
- * @param attributes - the attribute map
- * @returns
- */
- static matchesClass(
- ctor: typeof HTMLElement,
- tagName: string,
- attributes: AttributesMap
- ): boolean {
- return false;
- }
-
- constructor(public readonly tagName: string, renderInfo?: RenderInfo) {
- this.parent = renderInfo?.customElementInstanceStack.at(-1) || null;
- }
-
- connectedCallback() {}
- disconnectedCallback() {
- this.restoreElementDispatchEvent?.();
- this.parent = null;
- delete this.element;
- }
- abstract attributeChangedCallback(
- name: string,
- prev: string | null,
- next: string | null
- ): void;
-
- public dispatchEvent(event: Event): boolean {
- return this.element?.dispatchEvent(event) || false;
- }
-
- /**
- * Sets a property for the element if it exists.
- */
- public setProperty(name: string, value: unknown) {
- if (this.element) {
- (this.element as any)[name] = value;
- }
- }
-
- /**
- * Sets an attribute for the element if it exists.
- */
- public setAttribute(name: string, value: string) {
- if (this.element) {
- const prev = this.element.getAttribute(name);
- if (value !== prev) {
- DOM.setAttribute(this.element, name, value);
- this.attributeChangedCallback(name, prev, value);
- }
- }
- }
-}
-
-export function renderAttribute(name: string, value: unknown, tagName?: string) {
- if (value === "" || value === undefined || value === null) {
- return ` ${name}`;
- } else if (typeof value === "string") {
- return ` ${name}="${escapeHtml(value)}"`;
- } else if (typeof value === "boolean" || typeof value === "number") {
- return ` ${name}="${value}"`;
- } else {
- throw new Error(`Cannot assign attribute '${name}' for element ${tagName}.`);
- }
-}
-
-/**
- * An ElementRenderer used as a fallback in the case where a custom element is
- * either unregistered or has no other matching renderer.
- */
-export class FallbackRenderer extends DefaultElementRenderer implements ElementRenderer {
- public element?: HTMLElement | undefined;
-
- /**
- * When true, instructs the ElementRenderer to yield the `defer-hydration` attribute for
- * rendered elements.
- */
- public deferHydration = false;
-
- private readonly _attributes: { [name: string]: string } = {};
-
- public setAttribute(name: string, value: string) {
- if (value === undefined || value === null) {
- this.removeAttribute(name);
- } else {
- this._attributes[name] = value;
- }
- }
-
- public removeAttribute(name: string) {
- delete this._attributes[name];
- }
-
- public *renderAttributes(): IterableIterator {
- if (this.deferHydration) {
- yield " defer-hydration";
- }
- for (const [name, value] of Object.entries(this._attributes)) {
- yield renderAttribute(name, value, this.element?.tagName);
- }
- }
-
- attributeChangedCallback() {}
- /* eslint-disable-next-line */
- *renderShadow() {}
-}
diff --git a/packages/fast-ssr/src/element-renderer/fast-element-renderer.ts b/packages/fast-ssr/src/element-renderer/fast-element-renderer.ts
deleted file mode 100644
index 84581fa3321..00000000000
--- a/packages/fast-ssr/src/element-renderer/fast-element-renderer.ts
+++ /dev/null
@@ -1,336 +0,0 @@
-import {
- DOM,
- DOMAspect,
- ExecutionContext,
- FASTElement,
- FASTElementDefinition,
- HostController,
- Observable,
- observable,
-} from "@microsoft/fast-element";
-import { PendingTaskEvent } from "@microsoft/fast-element/pending-task.js";
-import { RenderInfo } from "../render-info.js";
-import { StyleRenderer } from "../styles/style-renderer.js";
-import { FASTSSRStyleStrategy } from "../styles/style-strategy.js";
-import { DefaultTemplateRenderer } from "../template-renderer/template-renderer.js";
-import { SSRView } from "../view.js";
-import { DefaultElementRenderer, renderAttribute } from "./element-renderer.js";
-import { AsyncElementRenderer, AttributesMap, ElementRenderer } from "./interfaces.js";
-
-/**
- * Sinks to apply aspect operations to an element
- */
-const sinks: Record void> = {
- [DOMAspect.property]: (el: any, name: string, value: any) => {
- el[name] = value;
- },
- [DOMAspect.attribute]: DOM.setAttribute,
- [DOMAspect.booleanAttribute]: DOM.setBooleanAttribute,
-};
-
-/**
- * An {@link ElementRenderer} implementation designed to render components
- * built with FAST.
- *
- */
-abstract class FASTElementRenderer extends DefaultElementRenderer {
- /**
- * The element instance represented by the {@link FASTElementRenderer}.
- */
- public readonly element!: FASTElement;
-
- /**
- * The custom element constructor
- */
- public readonly ctor: CustomElementConstructor;
-
- /**
- * A function that decies if given tagName should defer hydration.
- * When true, instructs the ElementRenderer to yield the `defer-hydration` attribute for
- * rendered elements.
- */
- protected abstract deferHydration: (tagName: string) => boolean;
-
- protected needsHydration: boolean = false;
-
- /**
- * The template renderer to use when rendering a component template
- */
- @observable
- protected abstract templateRenderer: DefaultTemplateRenderer;
- templateRendererChanged() {
- if (this.templateRenderer) {
- this.needsHydration = this.templateRenderer.emitHydratableMarkup;
- }
- }
-
- /**
- * Responsible for rendering stylesheets
- */
- protected abstract styleRenderer: StyleRenderer;
-
- protected attributes: AttributesMap = new Map();
-
- public static matchesClass(
- ctor: typeof HTMLElement,
- tagName: string,
- attributes: AttributesMap
- ): boolean {
- return ctor.prototype instanceof FASTElement;
- }
-
- /**
- * Indicate to the {@link FASTElementRenderer} that the instance should execute DOM connection behavior.
- */
- public connectedCallback(): void {
- super.connectedCallback();
- Observable.getNotifier(this.element.$fastController).subscribe(
- this,
- "isConnected"
- );
-
- try {
- this.element.connectedCallback();
- } catch (e) {
- const { tryRecoverFromErrors } = this.templateRenderer;
- if (tryRecoverFromErrors) {
- this.disableTemplateRendering();
-
- if (typeof tryRecoverFromErrors === "function") {
- tryRecoverFromErrors(e);
- }
- } else {
- throw e;
- }
- }
- }
-
- public disconnectedCallback(): void {
- super.disconnectedCallback();
- Observable.getNotifier(this.element.$fastController).unsubscribe(
- this,
- "isConnected"
- );
- this.element.disconnectedCallback();
- }
-
- public handleChange(source: HostController, property: "isConnected") {
- if (this.element.$fastController.isConnected) {
- const view = this.element.$fastController.view;
-
- if (view && SSRView.isSSRView(view)) {
- if (view.hostStaticAttributes) {
- view.hostStaticAttributes.forEach((value, key) => {
- this.element.setAttribute(key, value);
- });
- }
-
- if (view.hostDynamicAttributes) {
- for (const attr of view.hostDynamicAttributes) {
- const aspect = attr.factory.aspectType;
- if (aspect in sinks && attr.factory.dataBinding) {
- sinks[aspect](
- this.element,
- attr.factory.targetAspect,
- attr.factory.dataBinding.evaluate(
- this.element,
- ExecutionContext.default
- )
- );
- }
- }
- }
- }
- }
- }
-
- /**
- * Disables the rendering of the component's template.
- */
- protected disableTemplateRendering() {
- this.renderShadow = noOpRenderShadow;
- this.yieldAttributes = yieldContextualAttributes;
- this.needsHydration = false;
- }
-
- /**
- * Indicate to the {@link FASTElementRenderer} that an attribute has been changed.
- * @param name - The name of the changed attribute
- * @param old - The old attribute value
- * @param value - The new attribute value
- */
- public attributeChangedCallback(
- name: string,
- old: string | null,
- value: string | null
- ): void {
- this.element.attributeChangedCallback(name, old, value);
- }
-
- public setAttribute(name: string, value: string): void {
- super.setAttribute(name, value);
- this.attributes.set(name, value);
- }
-
- /**
- * Constructs a new {@link FASTElementRenderer}.
- * @param tagName - the tag-name of the element to create.
- */
- constructor(tagName: string, renderInfo: RenderInfo) {
- super(tagName, renderInfo);
-
- const ctor = customElements.get(this.tagName);
-
- if (ctor) {
- this.ctor = ctor;
- this.element = new ctor() as FASTElement;
- (this.element as any).tagName = tagName;
- } else {
- throw new Error(
- `FASTElementRenderer was unable to find a constructor for a custom element with the tag name '${tagName}'.`
- );
- }
- }
-
- /**
- * Yield attributes assigned to the elmeent
- *
- */
- protected *yieldAttributes() {
- const { attributes } = this.element;
- for (
- let i = 0, name, value;
- i < attributes.length && ({ name, value } = attributes[i]);
- i++
- ) {
- yield renderAttribute(name, value, this.element.tagName);
- }
- }
-
- abstract renderShadow:
- | ((renderInfo: RenderInfo) => IterableIterator)
- | ((renderInfo: RenderInfo) => IterableIterator>);
-}
-
-export abstract class SyncFASTElementRenderer
- extends FASTElementRenderer
- implements ElementRenderer
-{
- renderAttributes = renderAttributesSync;
- renderShadow = renderShadow;
-}
-export abstract class AsyncFASTElementRenderer
- extends FASTElementRenderer
- implements AsyncElementRenderer
-{
- constructor(tagName: string, renderInfo: RenderInfo) {
- super(tagName, renderInfo);
-
- this.element.addEventListener(PendingTaskEvent.type, this.pendingTaskHandler);
- }
- public *renderAttributes(
- this: AsyncFASTElementRenderer
- ): IterableIterator> {
- if (this.element !== undefined) {
- if (this.awaiting.size) {
- yield this.pauseRendering()
- .then(() => "")
- .catch(reason => {
- throw reason;
- });
- }
-
- yield* renderAttributesSync.call(this);
- }
- }
- renderShadow = renderShadow;
-
- private async pauseRendering() {
- for (const awaiting of this.awaiting) {
- try {
- await awaiting;
- } catch (e) {
- const { tryRecoverFromErrors } = this.templateRenderer;
-
- if (tryRecoverFromErrors) {
- this.disableTemplateRendering();
-
- if (typeof tryRecoverFromErrors === "function") {
- tryRecoverFromErrors(e);
- }
- } else {
- throw e;
- }
- }
- }
-
- this.awaiting.clear();
- }
-
- private awaiting: Set> = new Set();
-
- private pendingTaskHandler = (e: Event) => {
- if (PendingTaskEvent.isPendingTask(e)) {
- this.awaiting.add(e.complete);
- }
- };
-}
-
-function* renderAttributesSync(this: FASTElementRenderer): IterableIterator {
- yield* this.yieldAttributes();
-
- if (this.deferHydration(this.tagName)) {
- yield " defer-hydration";
- }
-
- if (this.needsHydration) {
- yield " needs-hydration";
- }
-}
-
-function* renderShadow(
- this: FASTElementRenderer,
- renderInfo: RenderInfo
-): IterableIterator {
- const view = this.element.$fastController.view as unknown as SSRView;
- const styles = FASTSSRStyleStrategy.getStylesFor(this.element);
-
- const elementDefinition = FASTElementDefinition.getByType(this.ctor);
- const yieldDSD = elementDefinition?.shadowOptions !== undefined;
- const yieldBoundaryMarker =
- elementDefinition && elementDefinition.shadowOptions === undefined && view;
-
- if (yieldDSD) {
- yield '';
- } else if (yieldBoundaryMarker) {
- yield ``;
- }
-
- if (styles) {
- yield this.styleRenderer.render(styles);
- }
-
- if (view !== null) {
- yield* this.templateRenderer.renderOpCodes(
- (view as unknown as SSRView).codes,
- renderInfo,
- this.element,
- ExecutionContext.default
- );
- }
-
- if (yieldDSD) {
- yield "";
- } else if (yieldBoundaryMarker) {
- yield ``;
- }
-}
-
-// eslint-disable-next-line
-function* noOpRenderShadow() {}
-function* yieldContextualAttributes(this: FASTElementRenderer) {
- const { attributes } = this;
- for (const [key, value] of attributes) {
- yield renderAttribute(key, value, this.element.tagName);
- }
-}
diff --git a/packages/fast-ssr/src/element-renderer/interfaces.ts b/packages/fast-ssr/src/element-renderer/interfaces.ts
deleted file mode 100644
index 0b911127fae..00000000000
--- a/packages/fast-ssr/src/element-renderer/interfaces.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { FASTElement, FASTElementDefinition } from "@microsoft/fast-element";
-import { RenderInfo } from "../render-info.js";
-
-/**
- * @beta
- */
-export interface ElementRenderer {
- readonly tagName: string;
- connectedCallback(): void;
- disconnectedCallback(): void;
- attributeChangedCallback(
- name: string,
- prev: string | null,
- next: string | null
- ): void;
- dispatchEvent(event: Event): boolean;
- setProperty(name: string, value: unknown): void;
- setAttribute(name: string, value: string): void;
- renderShadow(renderInfo: RenderInfo): IterableIterator;
- renderAttributes(): IterableIterator;
-}
-
-/**
- * @beta
- */
-export interface AsyncElementRenderer
- extends Omit {
- renderShadow(renderInfo: RenderInfo): IterableIterator>;
- renderAttributes(): IterableIterator>;
-}
-
-/**
- * @beta
- */
-export interface ConstructableElementRenderer<
- T extends ElementRenderer | AsyncElementRenderer = ElementRenderer
-> {
- new (tagName: string, renderInfo: RenderInfo): T;
-
- /**
- * Tests a constructor to determine if it should be managed by the ElementRenderer.
- * @param ctor - The constructor to test.
- */
- matchesClass(
- ctor: typeof HTMLElement,
- tagName: string,
- attributes: AttributesMap
- ): boolean;
-}
-
-/**
- * @beta
- */
-export interface ConstructableFASTElementRenderer<
- T extends ElementRenderer | AsyncElementRenderer = ElementRenderer
-> extends ConstructableElementRenderer {
- /**
- * Prevents this ElementRenderer from matching an element type.
- * @param elements - The elements to disable rendering for.
- *
- * @remarks
- * Elements can be disabled by tag-name, constructor, or FASTElementDefinition.
- */
- disable(...args: Array): void;
-}
-
-/**
- * @internal
- */
-export type AttributesMap = Map;
diff --git a/packages/fast-ssr/src/escape-html.ts b/packages/fast-ssr/src/escape-html.ts
deleted file mode 100644
index 8b1cb954714..00000000000
--- a/packages/fast-ssr/src/escape-html.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * This file was ported from {@link https://github.com/lit/lit/tree/main/packages/labs/ssr}.
- * Please see {@link ../ACKNOWLEDGEMENTS.md}
- */
-
-const replacements = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- // Note ' was not defined in the HTML4 spec, and is not supported by very
- // old browsers like IE8, so a codepoint entity is used instead.
- "'": "'",
-};
-
-/**
- * Replaces characters which have special meaning in HTML (&<>"') with escaped
- * HTML entities ("&", "<", etc.).
- */
-export const escapeHtml = (str: string) =>
- str.replace(/[&<>"']/g, char => replacements[char as keyof typeof replacements]);
diff --git a/packages/fast-ssr/src/event-utilities.ts b/packages/fast-ssr/src/event-utilities.ts
deleted file mode 100644
index 2719a0a5379..00000000000
--- a/packages/fast-ssr/src/event-utilities.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function shouldBubble(event: Event) {
- return event.bubbles && !event.cancelBubble;
-}
diff --git a/packages/fast-ssr/src/exports.spec.ts b/packages/fast-ssr/src/exports.spec.ts
deleted file mode 100644
index e4c45cea7e2..00000000000
--- a/packages/fast-ssr/src/exports.spec.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import "./install-dom-shim.js";
-
-import { strictEqual } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { FASTElement, html, HTMLDirective, ref, RefDirective, StatelessAttachedAttributeDirective, ViewController } from "@microsoft/fast-element";
-import { uniqueElementName } from "@microsoft/fast-element/testing.js";
-import fastSSR from "./exports.js";
-import { ViewBehaviorFactoryRenderer } from "./template-renderer/directives.js";
-import { consolidate } from "./test-utilities/consolidate.js";
-
-describe("fastSSR default export", () => {
- test("should return a TemplateRenderer configured to create a RenderInfo object using the returned ElementRenderer", () => {
- const { templateRenderer, ElementRenderer } = fastSSR();
- strictEqual(templateRenderer.createRenderInfo().elementRenderers.includes(ElementRenderer), true)
- })
-
- test("should render FAST elements without the `defer-hydration` attribute by default", () => {
- const { templateRenderer } = fastSSR();
- const name = uniqueElementName();
- FASTElement.define(name);
-
- strictEqual(consolidate(templateRenderer.render(`<${name}>${name}>`)),
- `<${name}>${name}>`
- );
- });
- test("should render FAST elements with the `defer-hydration` attribute when deferHydration is configured to be true", () => {
- const { templateRenderer } = fastSSR({ deferHydration: true });
- const name = uniqueElementName();
- FASTElement.define(name);
-
- strictEqual(consolidate(templateRenderer.render(`<${name}>${name}>`)),
- `<${name} defer-hydration>${name}>`
- )
- });
- test("should not render FAST elements with the `defer-hydration` attribute when deferHydration is configured to be false", () => {
- const { templateRenderer } = fastSSR({ deferHydration: false });
- const name = uniqueElementName();
- FASTElement.define(name);
-
- strictEqual(consolidate(templateRenderer.render(`<${name}>${name}>`)),
- `<${name}>${name}>`
- )
- });
-
- test("should render a custom directive using a registered ViewBehaviorFactoryRenderer", () => {
- class Directive extends StatelessAttachedAttributeDirective {
- bind(controller: ViewController) {}
- constructor(public readonly value: string) {
- super(value);
- }
- }
-
- HTMLDirective.define(Directive);
-
- const renderer: ViewBehaviorFactoryRenderer = {
- matcher: Directive,
- *render(behaviorFactory, renderInfo, source, renderer, context) {
- yield `value='${behaviorFactory.value}'`;
- },
- }
-
- const { templateRenderer } = fastSSR({viewBehaviorFactoryRenderers: [renderer]})
- strictEqual(consolidate(templateRenderer.render(html``)),
- ``
- )
- });
- test("should support overriding pre-registered ViewBehaviorFactoryRenderer", () => {
- class Directive extends StatelessAttachedAttributeDirective {
- bind(controller: ViewController) {}
- constructor(public readonly value: string) {
- super(value);
- }
- }
-
- const renderer: ViewBehaviorFactoryRenderer = {
- matcher: RefDirective,
- *render(behaviorFactory, renderInfo, source, renderer, context) {
- yield `ref='some-ref'`;
- },
- }
-
- const { templateRenderer } = fastSSR({viewBehaviorFactoryRenderers: [renderer]})
- strictEqual(consolidate(templateRenderer.render(html``)),
- ``
- )
- });
-});
diff --git a/packages/fast-ssr/src/exports.ts b/packages/fast-ssr/src/exports.ts
deleted file mode 100644
index 990a42d6740..00000000000
--- a/packages/fast-ssr/src/exports.ts
+++ /dev/null
@@ -1,207 +0,0 @@
-import { FASTElement, FASTElementDefinition } from "@microsoft/fast-element";
-import {
- AsyncFASTElementRenderer,
- SyncFASTElementRenderer,
-} from "./element-renderer/fast-element-renderer.js";
-import {
- AsyncElementRenderer,
- AttributesMap,
- ConstructableElementRenderer,
- ConstructableFASTElementRenderer,
- ElementRenderer,
-} from "./element-renderer/interfaces.js";
-import { RenderInfo } from "./render-info.js";
-import { StyleElementStyleRenderer, StyleRenderer } from "./styles/style-renderer.js";
-import {
- defaultViewBehaviorFactoryRenderers,
- ViewBehaviorFactoryRenderer,
-} from "./template-renderer/directives.js";
-import {
- AsyncTemplateRenderer,
- DefaultTemplateRenderer,
- TemplateRenderer,
-} from "./template-renderer/template-renderer.js";
-
-// Perform necessary configuration of FAST-Element library
-// for rendering in NodeJS
-import "./configure-fast-element.js";
-
-/**
- * Configuration for SSR factory.
- * @beta
- */
-export interface SSRConfiguration {
- /**
- * When 'async', configures the renderer to support async rendering.
- * 'async' rendering will yield 'string | Promise'
- *
- * Defaults to 'sync'.
- */
- renderMode?: "sync" | "async";
-
- /**
- * Configures the renderer to yield the `defer-hydration` attribute during element rendering.
- * Can be a boolean or a function that receives tagName and returns a boolean.
- * The `defer-hydration` attribute can be used to prevent immediate hydration of the element
- * by fast-element by importing hydration support in the client bundle.
- *
- * Defaults to `false`
- * @example
- *
- * ```ts
- * import "@microsoft/fast-element/install-element-hydration";
- * ```
- */
- deferHydration?: boolean | ((tagName: string) => boolean);
-
- /**
- * Configures the renderer to emit markup that allows fast-element to hydrate elements.
- *
- * Defaults to `false`
- */
- emitHydratableMarkup?: boolean;
-
- /**
- * Renderers for author-defined ViewBehaviorFactories.
- */
- viewBehaviorFactoryRenderers?: ViewBehaviorFactoryRenderer[];
-
- /**
- * When true or when a error handler is provided, the renderer will
- * attempt to recover from errors that occur at specific points,
- * during rendering, including:
- *
- * connectedCallback(): No declarative shadow-dom will be emitted for the element
- */
- tryRecoverFromError?: boolean | ((e: unknown) => void);
-
- /**
- * Optional custom style renderer instance, used to override StyleElementStyleRenderer
- */
- styleRenderer?: StyleRenderer;
-}
-
-/** @beta */
-function fastSSR(): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-/** @beta */
-function fastSSR(config: Omit): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-/** @beta */
-function fastSSR(config: SSRConfiguration & Record<"renderMode", "sync">): {
- templateRenderer: TemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-/** @beta */
-function fastSSR(config: SSRConfiguration & Record<"renderMode", "async">): {
- templateRenderer: AsyncTemplateRenderer;
- ElementRenderer: ConstructableFASTElementRenderer;
-};
-
-/**
- * Factory for creating SSR rendering assets.
- * @example
- * ```ts
- * import "@microsoft/install-dom-shim";
- * import fastSSR from "@microsoft/fast-ssr";
- * import { html } from "@microsoft/fast-element";
- * const { templateRenderer } = fastSSR();
- *
- * const streamableSSRResult = templateRenderer.render(html`...`);
- * ```
- *
- * @beta
- */
-function fastSSR(config?: SSRConfiguration): any {
- const rConfig: Required = {
- renderMode: "sync",
- deferHydration: false,
- emitHydratableMarkup: false,
- tryRecoverFromError: false,
- ...config,
- } as Required;
- const templateRenderer = new DefaultTemplateRenderer();
- const deferHydration =
- typeof rConfig.deferHydration === "function"
- ? rConfig.deferHydration
- : () => !!rConfig?.deferHydration;
- templateRenderer.deferHydration = deferHydration;
- templateRenderer.emitHydratableMarkup = !!rConfig.emitHydratableMarkup;
- templateRenderer.tryRecoverFromErrors = rConfig.tryRecoverFromError;
-
- const elementRenderer = class extends (rConfig.renderMode !== "async"
- ? SyncFASTElementRenderer
- : AsyncFASTElementRenderer) {
- static #disabledConstructors = new Set();
-
- public static matchesClass(
- ctor: typeof HTMLElement,
- tagName: string,
- attributes: AttributesMap
- ): boolean {
- if (FASTElementDefinition.getByType(ctor) === undefined) {
- return false;
- }
-
- const disabled = elementRenderer.#disabledConstructors;
-
- return !(disabled.has(tagName) || disabled.has(ctor));
- }
-
- public static disable(
- ...elements: Array
- ) {
- for (const element of elements) {
- elementRenderer.#disabledConstructors.add(
- element instanceof FASTElementDefinition ? element.type : element
- );
- }
- }
- protected templateRenderer: DefaultTemplateRenderer = templateRenderer;
- protected styleRenderer =
- rConfig.styleRenderer || new StyleElementStyleRenderer();
- protected deferHydration = deferHydration;
- };
-
- templateRenderer.withDefaultElementRenderers(
- elementRenderer as unknown as ConstructableElementRenderer
- );
-
- // Configure out-of-box ViewBehaviorFactory renderers first
- templateRenderer.withViewBehaviorFactoryRenderers(
- ...defaultViewBehaviorFactoryRenderers
- );
-
- // Add any author-defined ViewBehaviorFactories. This order allows overriding
- // out-of-box renderers.
- if (Array.isArray(rConfig.viewBehaviorFactoryRenderers)) {
- templateRenderer.withViewBehaviorFactoryRenderers(
- ...rConfig.viewBehaviorFactoryRenderers
- );
- }
-
- return {
- templateRenderer,
- ElementRenderer: elementRenderer,
- };
-}
-
-export default fastSSR;
-export * from "./declarative-shadow-dom-polyfill.js";
-export * from "./request-storage.js";
-export { templateCacheController } from "./template-parser/template-parser.js";
-export type {
- ElementRenderer,
- AsyncElementRenderer,
- StyleRenderer,
- TemplateRenderer,
- AsyncTemplateRenderer,
- ViewBehaviorFactoryRenderer,
- RenderInfo,
- ConstructableElementRenderer,
- ConstructableFASTElementRenderer,
-};
diff --git a/packages/fast-ssr/src/fast-command-buffer/index.fixture.html b/packages/fast-ssr/src/fast-command-buffer/index.fixture.html
deleted file mode 100644
index fbfb1bcc383..00000000000
--- a/packages/fast-ssr/src/fast-command-buffer/index.fixture.html
+++ /dev/null
@@ -1,301 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et,
- consequat purus. Donec egetsodales lectus, vel sollicitudin
- ligula. Suspendisse volutpat auctor diam,vel mattis lorem
- venenatis in.
-
-
-
-
-
-
-
- Fake hydrate
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et,
- consequat purus. Donec egetsodales lectus, vel sollicitudin
- ligula. Suspendisse volutpat auctor diam,vel mattis lorem
- venenatis in.
-
-
-
-
-
-
-
- Fake hydrate
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/fast-ssr/src/fast-command-buffer/index.ts b/packages/fast-ssr/src/fast-command-buffer/index.ts
deleted file mode 100644
index a44beeb69f1..00000000000
--- a/packages/fast-ssr/src/fast-command-buffer/index.ts
+++ /dev/null
@@ -1,149 +0,0 @@
-const FASTCommandBufferAttributeName: string = "data-fast-buffer-events";
-
-interface CommandCache {
- originalNode: HTMLElement;
- event: Event;
- attachedNode: HTMLElement | null;
-}
-
-/**
- * Component for recording user events on SSR rendered FAST components which have not yet hydrated and replaying those
- * events when they have.
- * During SSR an instance of the component should be placed as a direct child within every template
- * that contains children with behaviors bound to user generated events (click, mouseover, focus, etc). When those child element
- * tags are rendered FASTCommandBufferAttributeName attribute must be included that lists the events which the element needs to
- * have recorded as a comma delimited list (i.e. ).
- * Once the page loads the FASTCommandBuffer instances will automatically attach event listeners to the elements with the
- * FASTCommandBufferAttributeName for the events listed and will record any user generated events to a global static cache.
- * During hydration of the components FAST-Element will need to stop event recording by removing the FASTCommandBuffer element from
- * the template or by calling the stopRecording() method. FAST-Element must then identify any elements with behaviors and depending on how the
- * hydration occurs either map the old element to a new replacing element or confirm to the FASTCommandCache that the element is
- * the same by calling the FASTCommandBuffer.attachElementToEvents() static method. Once all elements that have recorded events are
- * matched up then they will be automatically replayed.
- */
-class FASTCommandBuffer extends HTMLElement {
- // Global static cache of recorded events
- private static globalCommandCache: CommandCache[] = [];
-
- /**
- * During hydration the original elements with recordable events must be matched up to
- * the new element, in the case the template is replaced, or simply to the same element
- * when not being replaced. The hydration process should call this method passing the
- * original element instance along with the element that is replacing it. All recorded
- * events will be automatically replayed once all recorded events have had elements
- * attached.
- * @param origNode The original element that recorded events.
- * @param attachNode The new element replacing it or the same element.
- */
- public static attachElementToEvents(origNode: HTMLElement, attachNode: HTMLElement) {
- let unattachedNodes: boolean = false;
- // Loop through the command cache matching up the elements.
- FASTCommandBuffer.globalCommandCache.forEach((item: CommandCache) => {
- if (item.originalNode.isSameNode(origNode)) {
- item.attachedNode = attachNode;
- } else if (item.attachedNode === null) {
- unattachedNodes = true;
- }
- });
- // if all recorded events have been matched then replay the events.
- if (!unattachedNodes) {
- FASTCommandBuffer.replayAll();
- }
- }
-
- // Static method for manually replaying events
- public static replayAll(): void {
- /**
- * Loop through cache, replay the event and remove it from the cache.
- * Loop until we reach the end or there is an event without an attachedNode since there
- * is a chance that more events could be recorded while we are looping.
- */
- while (
- this.globalCommandCache.length > 0 &&
- this.globalCommandCache[0].attachedNode !== null
- ) {
- this.globalCommandCache[0].attachedNode.dispatchEvent(
- this.globalCommandCache[0].event
- );
- this.globalCommandCache.splice(0, 1);
- }
- }
-
- /**
- * Cache for the Template element containing the FASTCommandCache instance. Needed when removing event recorders
- * during disconnectedCallback.
- */
- private templateRoot: ShadowRoot | undefined;
-
- /**
- * @internal
- */
- public connectedCallback(): void {
- this.templateRoot = this.parentNode as ShadowRoot;
- this.addEventRecorders();
- }
-
- public disconnectedCallback(): void {
- // Remove recording event listeners
- this.removeEventRecorders();
- }
-
- /**
- * Records an event to the globalCommandCache.
- * @param ev The event to be recorded.
- */
- public recordEvent(ev: Event) {
- FASTCommandBuffer.globalCommandCache.push({
- originalNode: ev.currentTarget as HTMLElement,
- event: ev,
- attachedNode: null,
- });
- }
-
- /**
- * Remove recording event listeners from the template containing this FASTCommandBuffer instance.
- * Events will no longer be recorded within this template after this is called.
- */
- public stopRecording(): void {
- this.removeEventRecorders();
- }
-
- /**
- * Find all instances of elements with the FASTCommandBufferAttributeName attribute and attach the
- * recording event listeners for the specified events.
- */
- private addEventRecorders() {
- const elements: NodeListOf = this.templateRoot!.querySelectorAll(
- `[${FASTCommandBufferAttributeName}]`
- );
- elements.forEach((el: Element) => {
- const eventlist: string[] = el
- .getAttribute(FASTCommandBufferAttributeName)!
- .split(",");
- eventlist.forEach((ev: string) => {
- el.addEventListener(ev.trim(), this.recordEvent);
- });
- });
- }
-
- /**
- * Find all instances of elements with the FASTCommandBufferAttributeName attribute and remove the
- * recording event listeners for the specified events.
- */
- private removeEventRecorders() {
- const elements: NodeListOf = this.templateRoot!.querySelectorAll(
- `[${FASTCommandBufferAttributeName}]`
- );
- elements.forEach((el: Element) => {
- const eventlist: string[] = el
- .getAttribute(FASTCommandBufferAttributeName)!
- .split(",");
- eventlist.forEach(ev => {
- el.removeEventListener(ev.trim(), this.recordEvent);
- });
- });
- }
-}
-
-customElements.define("fast-command-buffer", FASTCommandBuffer);
-export { FASTCommandBuffer, FASTCommandBufferAttributeName };
diff --git a/packages/fast-ssr/src/install-dom-shim.ts b/packages/fast-ssr/src/install-dom-shim.ts
deleted file mode 100644
index 2ce958e992d..00000000000
--- a/packages/fast-ssr/src/install-dom-shim.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { createWindow, installWindowOnGlobal } from "./dom-shim.js";
-
-installWindowOnGlobal(createWindow());
diff --git a/packages/fast-ssr/src/render-info.spec.ts b/packages/fast-ssr/src/render-info.spec.ts
deleted file mode 100644
index e315c80b050..00000000000
--- a/packages/fast-ssr/src/render-info.spec.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import "./install-dom-shim.js";
-import { strictEqual } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { FallbackRenderer } from "./element-renderer/element-renderer.js";
-import { AttributesMap } from "./element-renderer/interfaces.js";
-import { DefaultRenderInfo } from "./render-info.js"
-
-describe("RenderInfo", () => {
- class TestRenderer extends FallbackRenderer {
- static matchesClass(ctor: { new(): HTMLElement; prototype: HTMLElement; }, tagName: string, attributes: AttributesMap): boolean {
- return true;
- }
- public connected = false;
-
- connectedCallback() {
- super.connectedCallback();
- this.connected = true;
- }
- disconnectedCallback() {
- super.disconnectedCallback();
- this.connected = false;
- }
- }
-
- describe("should have a 'dispose' method", () => {
- test("that calls the disconnectedCallback for all renderers in 'customElementInstanceStack'", () => {
- const renderInfo = new DefaultRenderInfo([TestRenderer]);
- const renderers = [new TestRenderer("test"), new TestRenderer("test"), new TestRenderer("test")]
- renderInfo.customElementInstanceStack.push(...renderers);
-
- renderers.forEach(x => {x.connectedCallback(); strictEqual(x.connected, true)})
-
- renderInfo.dispose();
-
- renderers.forEach(x => strictEqual(x.connected, false))
- });
- test("that calls the disconnectedCallback for all renderers in 'renderCustomElementList'", () => {
- const renderInfo = new DefaultRenderInfo([TestRenderer]);
- const renderers = [new TestRenderer("test"), new TestRenderer("test"), new TestRenderer("test")]
- renderInfo.renderedCustomElementList.push(...renderers);
-
- renderers.forEach(x => {x.connectedCallback(); strictEqual(x.connected, true)})
-
- renderInfo.dispose();
-
- renderers.forEach(x => strictEqual(x.connected, false))
- });
-
- test("that removes all renderers from 'renderCustomElementList' and 'customElementInstanceStack", () => {
- const renderInfo = new DefaultRenderInfo([TestRenderer]);
- const rendered = [new TestRenderer("test"), new TestRenderer("test"), new TestRenderer("test")];
- const instances = [new TestRenderer("test"), new TestRenderer("test"), new TestRenderer("test")];
- renderInfo.renderedCustomElementList.push(...rendered);
- renderInfo.customElementInstanceStack.push(...instances);
-
- strictEqual(renderInfo.renderedCustomElementList.length, 3);
- strictEqual(renderInfo.customElementInstanceStack.length, 3);
- renderInfo.dispose();
-
- strictEqual(renderInfo.renderedCustomElementList.length, 0);
- strictEqual(renderInfo.customElementInstanceStack.length, 0);
- });
-
- })
-});
diff --git a/packages/fast-ssr/src/render-info.ts b/packages/fast-ssr/src/render-info.ts
deleted file mode 100644
index cea31f1d130..00000000000
--- a/packages/fast-ssr/src/render-info.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * This file was ported from {@link https://github.com/lit/lit/tree/main/packages/labs/ssr}.
- * Please see {@link ../ACKNOWLEDGEMENTS.md}
- */
-import { Disposable } from "@microsoft/fast-element";
-import {
- ConstructableElementRenderer,
- ElementRenderer,
-} from "./element-renderer/interfaces.js";
-
-/**
- * @beta
- */
-export interface RenderInfo extends Disposable {
- /**
- * Element renderers to use
- */
- elementRenderers: ConstructableElementRenderer[];
-
- /**
- * Stack of open custom elements (in light dom or shadow dom)
- */
- customElementInstanceStack: ElementRenderer[];
-
- /**
- * Stack of open host custom elements (n-1 will be n's host)
- * @deprecated - use {@link (RenderInfo:interface).customElementInstanceStack}
- */
- customElementHostStack: ElementRenderer[];
-
- /**
- * A list of all Rendered custom elements.
- */
- renderedCustomElementList: ElementRenderer[];
-}
-
-/**
- * Default RenderInfo implementation
- *
- * @internal
- */
-export class DefaultRenderInfo implements RenderInfo {
- public customElementHostStack: ElementRenderer[] = [];
- public customElementInstanceStack: ElementRenderer[] = [];
- public renderedCustomElementList: ElementRenderer[] = [];
- constructor(public elementRenderers: ConstructableElementRenderer[] = []) {}
-
- public dispose(): void {
- for (const rendered of this.renderedCustomElementList) {
- rendered.disconnectedCallback();
- }
-
- for (let i = this.customElementInstanceStack.length - 1; i >= 0; i--) {
- this.customElementInstanceStack[i].disconnectedCallback();
- }
-
- // renderedCustomElementList was kept to cleanup custom elements after render; clear it after disconnect so it can be GC'd if needed
- this.renderedCustomElementList = [];
- this.customElementInstanceStack = [];
- }
-}
diff --git a/packages/fast-ssr/src/request-storage.spec.ts b/packages/fast-ssr/src/request-storage.spec.ts
deleted file mode 100644
index 5451d0a72e8..00000000000
--- a/packages/fast-ssr/src/request-storage.spec.ts
+++ /dev/null
@@ -1,237 +0,0 @@
-import "./install-dom-shim.js";
-import { deepStrictEqual, notStrictEqual, ok, strictEqual, throws } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { createWindow } from "./dom-shim.js";
-import { RequestStorage, RequestStorageManager } from "./request-storage.js";
-
-const noStorageError = { message: "Storage must be accessed from within a request." };
-
-describe("RequestStorageManager", () => {
- test("can create basic backing storage", () => {
- const storage = RequestStorageManager.createStorage();
-
- ok(storage instanceof Map);
- notStrictEqual(storage.get("window"), undefined);
- });
-
- test("can create backing storage with a custom window", () => {
- const w = createWindow();
- const storage = RequestStorageManager.createStorage({
- createWindow: () => w,
- });
-
- ok(storage instanceof Map);
- strictEqual(storage.get("window"), w);
- });
-
- test("should pass in request object to createWindow middleware", () => {
- function createWindowShim(req: any) {
- return {
- id: req.headers["id"]
- };
- }
- const request = { headers: { id: "test" } };
- const storage = RequestStorageManager.createStorage({
- createWindow: createWindowShim,
- }, request);
-
- ok(storage instanceof Map);
- deepStrictEqual(storage.get("window"), {id: "test"});
- });
-
- test("can create backing storage with initial values", () => {
- const initialValues = new Map();
- initialValues.set("hello", "world");
-
- const storage = RequestStorageManager.createStorage({
- storage: initialValues,
- });
-
- ok(storage instanceof Map);
- strictEqual(storage.get("hello"), "world");
- });
-
- test("can run a callback with the provided storage", () => {
- const initialValues = new Map();
- initialValues.set("hello", "world");
-
- const storage = RequestStorageManager.createStorage({
- storage: initialValues,
- });
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.get("hello");
- });
-
- strictEqual(captured, "world");
- throws(() => RequestStorage.get("hello"), noStorageError);
- });
-
- test("can get value from global without being in a storage scope", () => {
- // window is part of perRequestGlobals setup by installDOMShim
- (window as any)["hello"] = "world";
- RequestStorageManager.installDOMShim();
-
- strictEqual((window as any)["hello"], "world");
- });
-
- test("can get different value from global in a storage scope", () => {
- // window is part of perRequestGlobals setup by installDOMShim
- (window as any)["hello"] = "world";
- RequestStorageManager.installDOMShim();
-
- let captured;
- const storage = RequestStorageManager.createStorage();
- RequestStorageManager.run(storage, () => {
- captured = (window as any)["hello"];
- });
-
- notStrictEqual(captured, "world");
- });
-
- test("uninstalling the DOM shim should make previously assigned globals available within callback ", () => {
- // window is part of perRequestGlobals setup by installDOMShim
- (window as any)["hello"] = "world";
- RequestStorageManager.installDOMShim();
- RequestStorageManager.uninstallDOMShim();
-
- let captured;
- const storage = RequestStorageManager.createStorage();
- RequestStorageManager.run(storage, () => {
- captured = (window as any)["hello"];
- });
-
- strictEqual(captured, "world");
- });
- test("invoking installDOMShim multiple times should not impact the ability to uninstall the shim with a single invocation of uninstall", () => {
- // window is part of perRequestGlobals setup by installDOMShim
- (window as any)["hello"] = "world";
- RequestStorageManager.installDOMShim();
- RequestStorageManager.installDOMShim();
- RequestStorageManager.installDOMShim();
- RequestStorageManager.uninstallDOMShim();
-
- let captured;
- const storage = RequestStorageManager.createStorage();
- RequestStorageManager.run(storage, () => {
- captured = (window as any)["hello"];
- });
-
- strictEqual(captured, "world");
- });
- test("invoking uninstall multiple times should not impact the ability to reinstall the shim with a single invocation of install", () => {
- // window is part of perRequestGlobals setup by installDOMShim
- (window as any)["hello"] = "world";
- RequestStorageManager.installDOMShim();
- RequestStorageManager.uninstallDOMShim();
- RequestStorageManager.uninstallDOMShim();
- RequestStorageManager.uninstallDOMShim();
- RequestStorageManager.installDOMShim();
-
- let captured;
- const storage = RequestStorageManager.createStorage();
- RequestStorageManager.run(storage, () => {
- captured = (window as any)["hello"];
- });
-
- notStrictEqual(captured, "world");
- });
-});
-
-describe("RequestStorage", () => {
- test("provides a DOM container", () => {
- const storage = RequestStorageManager.createStorage();
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.container;
- });
-
- notStrictEqual(captured, undefined);
- throws(() => RequestStorage.container, noStorageError);
- });
-
- test("can set and get values", () => {
- const storage = RequestStorageManager.createStorage();
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.set("hello", "world");
- });
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.get("hello");
- });
-
- strictEqual(captured, "world");
- throws(() => RequestStorage.get("hello"), noStorageError);
- });
-
- test("can set and check values", () => {
- const storage = RequestStorageManager.createStorage();
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.set("hello", "world");
- });
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.has("hello");
- });
-
- ok(captured);
- throws(() => RequestStorage.get("hello"), noStorageError);
- });
-
- test("can set and delete values", () => {
- const storage = RequestStorageManager.createStorage();
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.set("hello", "world");
- });
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.has("hello");
- });
-
- ok(captured);
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.delete("hello");
- });
-
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.has("hello");
- });
-
- ok(!captured);
- });
-
- test("can clear values", () => {
- const storage = RequestStorageManager.createStorage();
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.set("hello", "world");
- RequestStorage.set("foo", "bar");
- });
-
- let captured;
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.has("hello") && RequestStorage.has("foo");
- });
-
- ok(captured);
-
- RequestStorageManager.run(storage, () => {
- RequestStorage.clear();
- });
-
- RequestStorageManager.run(storage, () => {
- captured = RequestStorage.has("hello") || RequestStorage.has("foo");
- });
-
- ok(!captured);
- });
-});
diff --git a/packages/fast-ssr/src/request-storage.ts b/packages/fast-ssr/src/request-storage.ts
deleted file mode 100644
index f21a1cf8fbf..00000000000
--- a/packages/fast-ssr/src/request-storage.ts
+++ /dev/null
@@ -1,300 +0,0 @@
-import { AsyncLocalStorage } from "async_hooks";
-import { DI, DOMContainer } from "@microsoft/fast-element/di.js";
-import { createWindow } from "./dom-shim.js";
-
-let asyncLocalStorage = new AsyncLocalStorage();
-const defaultOptions = {};
-
-function getStore() {
- const store = asyncLocalStorage.getStore();
-
- if (!store) {
- throw new Error("Storage must be accessed from within a request.");
- }
-
- return store as Map;
-}
-
-function getItem(key: any, fallback: () => T): T;
-function getItem(key: any): T | undefined;
-function getItem(key: any, fallback?: () => T): T | undefined {
- const store = getStore();
- let found = store.get(key);
-
- if (found === void 0 && fallback) {
- found = fallback();
- store.set(key, found);
- }
-
- return found;
-}
-
-/**
- * Get and set values that are local to the current
- * HTTP request.
- * @remarks
- * Also, provides access to a request-scoped DI container.
- * @beta
- */
-export const RequestStorage = Object.freeze({
- /**
- * The request-scoped DI container.
- */
- get container(): DOMContainer {
- return RequestStorage.get("$$container$$", () =>
- DI.getOrCreateDOMContainer(window)
- );
- },
-
- /**
- * Stores a value in request-scoped storage.
- * @param key - The key to store the value under.
- * @param value - The value to store.
- * @returns This RequestStorage instance.
- */
- set(key: any, value: any) {
- getStore().set(key, value);
- return this;
- },
-
- /**
- * Gets a value from request-scoped storage.
- * @param key - The key to get the value for.
- * @param fallback - A function that provides a value if there is nothing stored under the key.
- * @returns The value stored under the key.
- * @remarks
- * The return result of the fallback function will be stored under the key for later access.
- */
- get: getItem,
-
- /**
- * Clears all request-scoped values.
- */
- clear(): void {
- getStore().clear();
- },
-
- /**
- *
- * @param key - The request-scoped key to delete.
- * @returns true if the value was deleted; false otherwise.
- */
- delete(key: any): boolean {
- return getStore().delete(key);
- },
-
- /**
- * Determines whether there's a request-scoped value for the given key.
- * @param key - The key to check.
- * @returns true if the key exists; false otherwise
- */
- has(key: any): boolean {
- return getStore().has(key);
- },
-});
-
-/**
- * Options used in creating the backing storage for RequestStorage.
- * @beta
- */
-export type StorageOptions = {
- /**
- * A custom window creation function.
- */
- createWindow?: (req: any) => { [key: string]: unknown };
-
- /**
- * Initial values to setup in the backing store.
- */
- storage?: Map;
-};
-
-/**
- * An Express-compatible middleware function.
- * @beta
- */
-export type Middleware = (req: any, res: any, next: () => any) => void;
-
-const perRequestGlobals = [
- "dispatchEvent",
- "addEventListener",
- "removeEventListener",
- "window",
- "document",
- "location",
-];
-
-const perRequestGetters = perRequestGlobals.reduce((accum, key) => {
- accum[key] = function get() {
- // Return original global variable if currently not in the storage scope
- const store = asyncLocalStorage.getStore() as Map;
- return store ? store.get("window")[key] : preShimGlobals.get(key);
- };
- return accum;
-}, {} as Record unknown>);
-
-/**
- * Tests whether the {@link RequestStorageManager} has an installed
- * DOM shim for a provided key. Determination is performed by checking
- * the getter instance of the globalThis's property descriptor against the preRequestDescriptors
- * of the same key.
- * @param key - The key of the global check for installation
- */
-function shimIsInstalledFor(key: string): boolean {
- return (
- Object.getOwnPropertyDescriptor(globalThis, key)?.get === perRequestGetters[key]
- );
-}
-
-/**
- * Store the global objects being shimmed so that they be accessed as backup values
- * and restored during uninstall.
- */
-const preShimGlobals = new Map();
-const preShimDescriptors = new Map();
-
-/**
- * APIs used in configuring and managing RequestStorage.
- * @beta
- */
-export const RequestStorageManager = Object.freeze({
- /**
- * Gets the current AsyncLocalStorage instance that provides
- * the backend for the RequestStorageManager.
- */
- get backend(): AsyncLocalStorage {
- return asyncLocalStorage;
- },
-
- /**
- * Sets an AsyncLocalStorage instance to provide
- * a pre-existing backend for the RequestStorageManager.
- * @remarks
- * Replacing the default AsyncLocalStorage backend should not be
- * done under normal circumstances. This capability is intended for
- * advanced integration scenarios only.
- *
- * Avoid setting this property after middleware is installed or in the
- * middle of a RequestStorageManager#run operation. In the event that
- * this timing is necessary, then you must provide a window instance
- * available through the "window" key of your storage, otherwise the
- * necessary requirements for RequestStorage to function will not be met.
- */
- set backend(localStorage: AsyncLocalStorage) {
- asyncLocalStorage = localStorage;
- },
-
- /**
- * Installs a DOM shim that ensures that window, document,
- * and other globals are scoped per-request. Calling this function
- * will have no effect if the shim has already been installed.
- *
- * @throws TypeError when properties cannot be defined on the globalThis.
- */
- installDOMShim(): void {
- for (const key of perRequestGlobals) {
- if (!shimIsInstalledFor(key)) {
- const preShimValue = (globalThis as any)[key];
- preShimGlobals.set(key, (globalThis as any)[key]);
- const preShimDescriptor = Object.getOwnPropertyDescriptor(
- globalThis,
- key
- );
-
- // This will throw if the globalThis already contains a value for the key that is not configurable. Do this work
- // prior to caching value and descriptor so if it does throw, the caches aren't polluted
- Object.defineProperty(globalThis, key, {
- get: perRequestGetters[key],
- enumerable: true,
- configurable: true,
- });
-
- if (preShimDescriptor) {
- preShimDescriptors.set(key, preShimDescriptor);
- }
-
- preShimGlobals.set(key, preShimValue);
- }
- }
- },
-
- /**
- * Uninstalls the DOM shim installed by {@link RequestStorageManager.installDOMShim}.
- * Calling this function will have no effect if there is no shim installed.
- */
- uninstallDOMShim(): void {
- for (const key of perRequestGlobals) {
- if (shimIsInstalledFor(key)) {
- if (preShimDescriptors.has(key)) {
- Object.defineProperty(globalThis, key, preShimDescriptors.get(key)!);
- preShimDescriptors.delete(key);
- } else {
- delete (globalThis as any)[key];
- }
-
- preShimGlobals.delete(key);
- }
- }
- },
-
- /**
- * Installs the dependency injection system as the strategy for
- * handling Context requests. The installed behavior will use
- * RequestStorage.container as the root DI container.
- */
- installDIContextRequestStrategy(): void {
- DI.installAsContextRequestStrategy(() => RequestStorage.container);
- },
-
- /**
- * Creates a backing store for RequestStorage.
- * @param options - The options used when creating the backing store for RequestStorage.
- * @returns A Map suitable as a backing store for RequestStorage.
- */
- createStorage(
- options: StorageOptions = defaultOptions,
- req: any = null
- ): Map {
- const storage = new Map();
- const window = options.createWindow ? options.createWindow(req) : createWindow();
-
- storage.set("window", window);
-
- if (options.storage) {
- for (const [key, value] of options.storage) {
- storage.set(key, value);
- }
- }
-
- return storage;
- },
-
- /**
- * Runs a function with the provided storage available through RequestStorage.
- * @param storage - The storage to scope to the callback.
- * @param callback - The function to execute with the storage context.
- * @returns The result of the invoked function.
- */
- run(storage: Map, callback: () => T): T {
- return asyncLocalStorage.run(storage, callback);
- },
-
- /**
- * Creates an Express-compatible middleware function.
- * @param options - The options used when creating the backing store for RequestStorage.
- * @returns A middleware function.
- * @remarks
- * Invoking this function installs the RequestStorageManager DOM shim and then returns
- * an Express-compatible middleware function. The middleware ensures that a unique
- * storage instance is created for every request and that the following middleware
- * functions in the pipeline are processed in the context of this storage.
- */
- middleware(options: StorageOptions = defaultOptions): Middleware {
- RequestStorageManager.installDOMShim();
-
- return (req: any, res: any, next: () => any): void => {
- const storage = RequestStorageManager.createStorage(options, req);
- RequestStorageManager.run(storage, next);
- };
- },
-});
diff --git a/packages/fast-ssr/src/styles/fast-style-config.ts b/packages/fast-ssr/src/styles/fast-style-config.ts
deleted file mode 100644
index 6c4820d636e..00000000000
--- a/packages/fast-ssr/src/styles/fast-style-config.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const fastStyleTagName = "fast-style";
diff --git a/packages/fast-ssr/src/styles/fast-style.fixture.html b/packages/fast-ssr/src/styles/fast-style.fixture.html
deleted file mode 100644
index a11fd944aab..00000000000
--- a/packages/fast-ssr/src/styles/fast-style.fixture.html
+++ /dev/null
@@ -1,416 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heading
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Maurisscelerisque varius ornare. Etiam convallis sollicitudin
- scelerisque.Maecenas in velit vehicula, aliquet orci et, consequat
- purus. Donec egetsodales lectus, vel sollicitudin ligula.
- Suspendisse volutpat auctor diam,vel mattis lorem venenatis in.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/fast-ssr/src/styles/fast-style.pw.spec.ts b/packages/fast-ssr/src/styles/fast-style.pw.spec.ts
deleted file mode 100644
index 01db31c6630..00000000000
--- a/packages/fast-ssr/src/styles/fast-style.pw.spec.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { expect, test } from "@playwright/test";
-
-test("Check that the first element has styles assigned", async ({ page }) => {
- test.slow();
- await page.goto("/fast-style");
-
- const cards = page.locator("fast-card");
- const styles = await cards.evaluateAll(cardList => {
- return cardList.map(card => {
- return window
- .getComputedStyle(card, null)
- .getPropertyValue("background-color");
- });
- });
-
- expect(styles[0]).toEqual("rgb(26, 26, 26)");
-});
-test("Check that the nested element in the first element has styles assigned", async ({
- page,
-}) => {
- test.slow();
- await page.goto("/fast-style");
-
- const cards = page.locator("fast-card");
- const styles = await cards.evaluateAll(cardList => {
- return cardList.map(card => {
- return window
- .getComputedStyle(
- card.shadowRoot?.querySelector("fast-button") as Element,
- null
- )
- .getPropertyValue("background-color");
- });
- });
-
- expect(styles[0]).toEqual("rgb(43, 43, 43)");
-});
-test("Check that all elements have styles assigned", async ({ page }) => {
- test.slow();
- await page.goto("/fast-style");
-
- const cards = page.locator("fast-card");
- const styles = await cards.evaluateAll(cardList => {
- return cardList.map(card => {
- return window
- .getComputedStyle(card, null)
- .getPropertyValue("background-color");
- });
- });
-
- expect(styles).toHaveLength(10);
-
- styles.forEach(style => {
- expect(style).toEqual("rgb(26, 26, 26)");
- });
-});
-test("Check that all nested elements have styles assigned", async ({ page }) => {
- test.slow();
- await page.goto("/fast-style");
-
- const cards = page.locator("fast-card");
- const styles = await cards.evaluateAll(cardList => {
- return cardList.map(card => {
- return window
- .getComputedStyle(
- card.shadowRoot?.querySelector("fast-button") as Element,
- null
- )
- .getPropertyValue("background-color");
- });
- });
-
- expect(styles).toHaveLength(10);
-
- styles.forEach(style => {
- expect(style).toEqual("rgb(43, 43, 43)");
- });
-});
diff --git a/packages/fast-ssr/src/styles/fast-style.ts b/packages/fast-ssr/src/styles/fast-style.ts
deleted file mode 100644
index ba1020e5de5..00000000000
--- a/packages/fast-ssr/src/styles/fast-style.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import { fastStyleTagName } from "./fast-style-config.js";
-
-interface StyleCache {
- [key: string]: CSSStyleSheet | string;
-}
-
-/**
- * The FASTStyle web component that takes attributes:
- * - css - a string version of the CSS to be applied to the parent web component, this can be omitted if the style-id has been used in the DOM as the cached value will be fetched
- * - style-id - a dataset attribute used as an identifier for the CSS attr string
- */
-export default class FASTStyle extends HTMLElement {
- private static cache: StyleCache = {};
- private static hashIdDataSetName: string = "style-id";
- private static supportsAdoptedStyleSheets: boolean =
- Array.isArray((document as any).adoptedStyleSheets) &&
- "replace" in CSSStyleSheet.prototype;
-
- /**
- * @internal
- */
- public connectedCallback(): void {
- const hashId: string = this.getAttribute(FASTStyle.hashIdDataSetName) as string;
- const css: string = this.getAttribute("css") as string;
- this.registerStyles(hashId, css);
- }
-
- /**
- * Register styles if they are not part of the cache and attach them
- */
- private registerStyles = (hashId: string, css: string): void => {
- if (FASTStyle.supportsAdoptedStyleSheets) {
- if (!(hashId in FASTStyle.cache)) {
- this.memoizeAdoptedStylesheetStyles(hashId, css);
- }
- this.attachAdoptedStylesheetStyles(this.parentNode as ShadowRoot, hashId);
- } else {
- if (!(hashId in FASTStyle.cache)) {
- this.memoizeStyleElementStyles(hashId, css);
- }
- this.attachStyleElementStyles(this.parentNode as ShadowRoot, hashId);
- }
- };
-
- /**
- * Memoize CSSStyleSheets
- */
- private memoizeAdoptedStylesheetStyles(hashId: string, css: string) {
- const sheet = new CSSStyleSheet();
- (sheet as any).replaceSync(css);
- FASTStyle.cache[hashId] = sheet;
- }
-
- /**
- * Attach CSSStyleSheets
- */
- private attachAdoptedStylesheetStyles(shadowRoot: ShadowRoot, hashId: string) {
- (shadowRoot as any).adoptedStyleSheets = [
- ...(shadowRoot as any).adoptedStyleSheets!,
- FASTStyle.cache[hashId] as CSSStyleSheet,
- ];
- }
-
- /**
- * Memoize css strings
- */
- private memoizeStyleElementStyles(hashId: string, css: string) {
- FASTStyle.cache[hashId] = css;
- }
-
- /**
- * Attach style elements
- */
- private attachStyleElementStyles(shadowRoot: ShadowRoot, hashId: string) {
- const element = document.createElement("style");
- element.innerHTML = FASTStyle.cache[hashId] as string;
- shadowRoot.append(element);
- }
-}
-
-customElements.define(fastStyleTagName, FASTStyle);
diff --git a/packages/fast-ssr/src/styles/style-renderer.spec.ts b/packages/fast-ssr/src/styles/style-renderer.spec.ts
deleted file mode 100644
index d762f5ccbe1..00000000000
--- a/packages/fast-ssr/src/styles/style-renderer.spec.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import "../install-dom-shim.js";
-import { notStrictEqual, strictEqual } from "node:assert/strict";
-import { describe, test, afterEach } from "node:test";
-import "./fast-style.js";
-import { css } from "@microsoft/fast-element";
-import { FASTStyleStyleRenderer } from "./style-renderer.js";
-
-const cssSheetRegex = /css="?(.+)"/m;
-function getSheet(element: string): string | null {
- const result = cssSheetRegex.exec(element);
-
- if (result === null) {
- return null
- } else {
- return result[1];
- }
-}
-
-describe("FASTStyleStyleRenderer", () => {
- const styleCache = new Set();
-
- afterEach(() => {
- styleCache.clear();
- });
-
- test("should return a ' element", () => {
- const style = css``;
- styleCache.add(style);
- const renderer = new FASTStyleStyleRenderer();
- const tester = /<\/fast-style>/;
- notStrictEqual(tester.test(renderer.render(styleCache)), null);
- });
- test("should return a ' element without a 'css' attribute when the sheet has already been rendered", () => {
- const renderer = new FASTStyleStyleRenderer();
- const style = css``;
- styleCache.add(style);
- const firstResult = renderer.render(styleCache);
- strictEqual(cssSheetRegex.test(firstResult), true);
-
- const secondResult = renderer.render(styleCache);
-
- notStrictEqual(firstResult, secondResult);
- strictEqual(cssSheetRegex.test(secondResult), false);
- });
-
- test("should emit the sheet content into the 'css' attribute the first time a sheet instance is rendered", () => {
- const renderer = new FASTStyleStyleRenderer();
- const style = css`:host{ color: red; }`;
- styleCache.add(style);
-
- const result = renderer.render(styleCache);
-
- strictEqual(getSheet(result), `:host{ color: red; }`);
- });
-
- test("should emit the sheet content for embedded ElementStyle instances", () => {
- const renderer = new FASTStyleStyleRenderer();
- const style = css`:host{ color: red; } ${css`:host { background: blue; }`}`;
- styleCache.add(style);
- const result = renderer.render(styleCache);
-
- strictEqual(getSheet(result), ':host{ color: red; } :host { background: blue; }');
- });
-
-
- test("should emit the sheet content for embedded strings", () => {
- const renderer = new FASTStyleStyleRenderer();
- const style = css`:host{ color: red; } ${`:host { background: blue; }`}`;
- styleCache.add(style);
- const result = renderer.render(styleCache);
-
- strictEqual(getSheet(result), `:host{ color: red; } :host { background: blue; }`);
- });
-});
diff --git a/packages/fast-ssr/src/styles/style-renderer.ts b/packages/fast-ssr/src/styles/style-renderer.ts
deleted file mode 100644
index ecf8bf6f4df..00000000000
--- a/packages/fast-ssr/src/styles/style-renderer.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { ComposableStyles } from "@microsoft/fast-element";
-import { fastStyleTagName } from "./fast-style-config.js";
-function collectStyles(style: ComposableStyles): string {
- let content: string = "";
- if (typeof style === "string") {
- content = style;
- } else if (style instanceof CSSStyleSheet) {
- const rules = style.cssRules;
-
- for (let i = 0, length = rules.length; i < length; i++) {
- content += rules[i].cssText;
- }
- } else {
- for (const s of style.styles) {
- content += collectStyles(s);
- }
- }
-
- return content;
-}
-
-/**
- * A renderer for {@link @microsoft/fast-element#ComposableStyles}
- * @beta
- */
-export interface StyleRenderer {
- /**
- * Renders composable styles to a string.
- * @param styles - The styles to render.
- */
- render(styles: Set): string;
-}
-
-export class FASTStyleStyleRenderer implements StyleRenderer {
- private static stylesheetCache = new Map();
- private static nextId = (() => {
- let id = 0;
- const prefix = "fast-style";
- return () => `${prefix}-${id++}`;
- })();
-
- public render(styles: Set): string {
- let markup = "";
-
- styles.forEach(style => {
- let id = FASTStyleStyleRenderer.stylesheetCache.get(style);
- const content = id === undefined ? collectStyles(style) : null;
- let contentAttr = "";
-
- if (content !== null) {
- id = FASTStyleStyleRenderer.nextId();
- FASTStyleStyleRenderer.stylesheetCache.set(style, id);
- contentAttr = `css="${content}"`;
- }
-
- markup += `<${fastStyleTagName} style-id="${id}" ${contentAttr}>${fastStyleTagName}>`;
- });
-
- return markup;
- }
-}
-
-export class StyleElementStyleRenderer implements StyleRenderer {
- public render(styles: Set): string {
- let styleTags = "";
-
- styles.forEach(style => {
- styleTags += ``;
- });
-
- return styleTags;
- }
-}
diff --git a/packages/fast-ssr/src/styles/style-strategy.ts b/packages/fast-ssr/src/styles/style-strategy.ts
deleted file mode 100644
index 8e5aba4bc9c..00000000000
--- a/packages/fast-ssr/src/styles/style-strategy.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { StyleStrategy, StyleTarget } from "@microsoft/fast-element";
-
-const sheetsForTarget = new WeakMap>();
-
-function getOrCreateFor(target: StyleTarget): Set {
- let set = sheetsForTarget.get(target);
- if (set) {
- return set;
- }
-
- set = new Set();
- sheetsForTarget.set(target, set);
-
- return set;
-}
-
-export class FASTSSRStyleStrategy implements StyleStrategy {
- addStylesTo(target: StyleTarget) {
- const cache = getOrCreateFor(target);
-
- this.styles.forEach(style => cache?.add(style));
- }
-
- removeStylesFrom(target: StyleTarget) {
- const cache = getOrCreateFor(target);
-
- this.styles.forEach(style => cache?.delete(style));
- }
-
- constructor(private styles: (string | CSSStyleSheet)[]) {}
-
- public static getStylesFor(target: Element): Set | null {
- return sheetsForTarget.get(target) || null;
- }
-}
diff --git a/packages/fast-ssr/src/template-cache/controller.spec.ts b/packages/fast-ssr/src/template-cache/controller.spec.ts
deleted file mode 100644
index 839b6039235..00000000000
--- a/packages/fast-ssr/src/template-cache/controller.spec.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import "../install-dom-shim.js";
-import { strictEqual } from "node:assert/strict";
-import { describe, test, after, beforeEach } from "node:test";
-import { html, ViewTemplate } from "@microsoft/fast-element";
-import fastSSR, { templateCacheController } from "../exports.js";
-import { consolidate } from "../test-utilities/consolidate.js";
-
-
-
-test("should be enabled by default", () => {
- strictEqual(templateCacheController.disabled, false)
-});
-describe("TemplateCacheController", () => {
- let template: ViewTemplate;
- beforeEach(() => {
- templateCacheController.enable();
- template = html``;
- });
- after(() => {
- templateCacheController.enable();
- });
-
- test("should support being disabled and re-enabled", () => {
- templateCacheController.disable();
- strictEqual(templateCacheController.disabled, true);
- templateCacheController.enable();
- strictEqual(templateCacheController.disabled, false)
- });
-
- test("should cache template results after rendering a template", () => {
- const { templateRenderer } = fastSSR();
- strictEqual(templateCacheController.has(template), false);
- consolidate(templateRenderer.render(template));
- strictEqual(templateCacheController.has(template), true);
- });
-
- test("should not cache template when disabled", () => {
- templateCacheController.disable();
- const { templateRenderer } = fastSSR();
- consolidate(templateRenderer.render(template));
-
- strictEqual(templateCacheController.has(template), false);
- });
-});
diff --git a/packages/fast-ssr/src/template-cache/controller.ts b/packages/fast-ssr/src/template-cache/controller.ts
deleted file mode 100644
index 6075fff1815..00000000000
--- a/packages/fast-ssr/src/template-cache/controller.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { ViewTemplate } from "@microsoft/fast-element";
-
-export interface TemplateCacheController {
- /**
- * True when fast-ssr is not caching template results,
- * false when it is leveraging the cache.
- *
- * @default true;
- */
- readonly disabled: boolean;
-
- /**
- * Disables template caching and retrieval of template cache results from the cache.
- */
- disable(): void;
-
- /**
- * Enables template caching.
- */
- enable(): void;
-
- /**
- * Returns true when a provided template has been cached, otherwise false
- */
- has(template: ViewTemplate): boolean;
-}
-
-export class TemplateCacheControllerImpl implements TemplateCacheController {
- constructor(private cache: Pick, "get" | "has" | "set">) {}
- #disabled = false;
-
- public get disabled() {
- return this.#disabled;
- }
-
- public disable(): void {
- this.#disabled = true;
- }
-
- public enable(): void {
- this.#disabled = false;
- }
-
- public has(template: ViewTemplate): boolean {
- return this.cache.has(template);
- }
-
- public static create(
- ...cache: ConstructorParameters
- ): TemplateCacheController {
- return new TemplateCacheControllerImpl(...cache);
- }
-}
diff --git a/packages/fast-ssr/src/template-parser/id-generator.ts b/packages/fast-ssr/src/template-parser/id-generator.ts
deleted file mode 100644
index efb24595b71..00000000000
--- a/packages/fast-ssr/src/template-parser/id-generator.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
-
-/**
- * Gets a random char from {@link chars}
- */
-function getRandomChar() {
- return chars[Math.floor(Math.random() * (chars.length - 1))];
-}
-
-function getId(length: number): string {
- let str = "";
- for (let i = 0; i < length; i++) {
- str += getRandomChar();
- }
-
- return str;
-}
-
-const usedIds = new Set();
-// When id-associated object is garbage-collected,
-// delete the id from usedIds, allowing re-use.
-const gcHandler = new FinalizationRegistry((value: string) => {
- usedIds.delete(value);
-});
-
-/**
- * Generates an ID string. The ID is not guaranteed to be unique.
- * @param length - the number of characters in the id string.
- * @returns
- */
-export const IDManager = Object.freeze({
- /**
- * Returns a unique ID to associate to a specific object reference.
- * This manager does not store any references to the provided object,
- * so calling this more than once for an object will generate multiple
- * ids for the object.
- *
- * @param source - The object to associate the unique id.
- * @param length - The character length of the id string.
- * @returns the ID string.
- */
- getFor(source: T, length = 10): string {
- let str;
-
- // Generate a new ID until there is no collision
- do {
- str = getId(length);
- } while (usedIds.has(str));
-
- usedIds.add(str);
- gcHandler.register(source, str);
-
- return str;
- },
-});
diff --git a/packages/fast-ssr/src/template-parser/op-codes.ts b/packages/fast-ssr/src/template-parser/op-codes.ts
deleted file mode 100644
index eab7670c71a..00000000000
--- a/packages/fast-ssr/src/template-parser/op-codes.ts
+++ /dev/null
@@ -1,147 +0,0 @@
-import { Aspected, ViewBehaviorFactory, ViewTemplate } from "@microsoft/fast-element";
-import { IDManager } from "./id-generator.js";
-
-/**
- * Allows fast identification of operation types
- */
-export const enum OpType {
- customElementOpen,
- customElementClose,
- customElementAttributes,
- customElementShadow,
- attributeBinding,
- attributeBindingMarker,
- viewBehaviorFactory,
- templateElementOpen,
- templateElementClose,
- text,
-}
-
-/**
- * Operation to emit static text
- */
-export type TextOp = {
- type: OpType.text;
- value: string;
-};
-
-export type AttributeBindingMarkerOp = {
- type: OpType.attributeBindingMarker;
- indexes: number[];
-};
-
-/**
- * Operation to open a custom element
- */
-export type CustomElementOpenOp = {
- type: OpType.customElementOpen;
- /**
- * The tagname of the custom element
- */
- tagName: string;
-
- /**
- * The constructor of the custom element
- */
- ctor?: typeof HTMLElement;
-
- /**
- * Attributes of the custom element, non-inclusive of any attributes
- * that are the product of bindings
- */
- staticAttributes: Map;
-};
-
-/**
- * Operation to close a custom element
- */
-export type CustomElementCloseOp = {
- type: OpType.customElementClose;
-};
-
-export type CustomElementShadowOp = {
- type: OpType.customElementShadow;
-};
-
-/**
- * Operation to emit a ViewBehaviorFactory
- */
-export type ViewBehaviorFactoryOp = {
- type: OpType.viewBehaviorFactory;
- factory: ViewBehaviorFactory;
-
- /**
- * The index of the factory in the collection of ViewBehaviorFactories
- * in a template.
- */
- index: number;
-};
-
-/**
- * Operation to emit a bound attribute
- */
-export type AttributeBindingOp = {
- type: OpType.attributeBinding;
- factory: ViewBehaviorFactory & Aspected;
- useCustomElementInstance: boolean;
-
- /**
- * The indexes of the bindings in the collection of ViewBehaviorFactories.
- */
- index: number;
-};
-
-/**
- * Operation to emit a template element open tag
- */
-export type TemplateElementOpenOp = {
- type: OpType.templateElementOpen;
- staticAttributes: Map;
- // We need dynamic attributes here so we can emit the ``
- // from one operation
- dynamicAttributes: AttributeBindingOp[];
-};
-
-/**
- * Operation to emit a template element closing tag
- */
-export type TemplateElementCloseOp = {
- type: OpType.templateElementClose;
-};
-
-/**
- * Operation to emit to custom-element attributes
- */
-export type CustomElementAttributes = {
- type: OpType.customElementAttributes;
-};
-
-export type Op =
- | AttributeBindingOp
- | AttributeBindingMarkerOp
- | CustomElementOpenOp
- | CustomElementCloseOp
- | ViewBehaviorFactoryOp
- | CustomElementAttributes
- | CustomElementShadowOp
- | TemplateElementOpenOp
- | TemplateElementCloseOp
- | TextOp;
-
-export class OpCodes extends Array {
- private static readonly cache: WeakMap = new WeakMap();
- public readonly id = IDManager.getFor(this);
- public hydrationIndexOffset = 0;
-
- static get(key: ViewTemplate) {
- return OpCodes.cache.get(key);
- }
-
- static set(key: ViewTemplate, value: OpCodes) {
- return OpCodes.cache.set(key, value);
- }
-
- static has(key: ViewTemplate) {
- return OpCodes.cache.has(key);
- }
-}
diff --git a/packages/fast-ssr/src/template-parser/template-parser.spec.ts b/packages/fast-ssr/src/template-parser/template-parser.spec.ts
deleted file mode 100644
index d7c3e9ffe96..00000000000
--- a/packages/fast-ssr/src/template-parser/template-parser.spec.ts
+++ /dev/null
@@ -1,216 +0,0 @@
-import "../install-dom-shim.js";
-
-import { deepStrictEqual, doesNotThrow, notStrictEqual, strictEqual, throws } from "node:assert/strict";
-import { describe, test } from "node:test";
-import { customElement, DOMAspect, FASTElement, html, ViewBehaviorFactory, ViewTemplate } from "@microsoft/fast-element";
-import { AttributeBindingOp, CustomElementOpenOp, OpCodes, OpType, TemplateElementOpenOp, TextOp, ViewBehaviorFactoryOp } from "./op-codes.js";
-import { customElementNameExcludeList, parseStringToOpCodes, parseTemplateToOpCodes } from "./template-parser.js";
-
-@customElement("hello-world")
-class HelloWorld extends FASTElement {}
-
-function firstFactory(factories: Record) {
- for (const key in factories) {
- return factories[key];
- }
-
- return null;
-}
-
-describe("parseTemplateToOpCodes", () => {
- test("should throw when invoked with a ViewTemplate with a HTMLTemplateElement template", () => {
- throws(() => {
- parseTemplateToOpCodes(new ViewTemplate(document.createElement("template"), {}));
- });
- });
- test("should not throw when invoked with a ViewTemplate with a string template", () => {
- doesNotThrow(() => {
- parseTemplateToOpCodes(new ViewTemplate("", {}));
- });
- });
-
- test("should emit a single text op for a template with no bindings or directives", () => {
- const codes = parseTemplateToOpCodes(html`
${name}>`);
- });
- });
-
- test("should emit a single element template", () => {
- const { templateRenderer } = fastSSR();
- const result = templateRenderer.render(html`
Hello world
`)
-
- strictEqual(consolidate(result), "
Hello world
")
- });
-
- test("should emit un-registered custom elements without any shadow DOM", () => {
- const { templateRenderer } = fastSSR();
- const result = templateRenderer.render(html`Hello world`)
-
- strictEqual(consolidate(result), "Hello world");
- });
-
- test("should not render the template for elements that have been disabled via the ElementRenderer", () => {
- const name = uniqueElementName();
- class MyElement extends FASTElement {}
- const definition = MyElement.compose({name, template: html`
")
- });
- });
- }
-
- describe("with hydration binding emission enabled", () => {
- test("should emit a comment with the binding index when the binding is interpolated into element content", () => {
- const name = uniqueElementName();
- const template = html`
${() => "hello world"}
`;
- FASTElement.define({name, template});
- const { templateRenderer } = fastSSR({emitHydratableMarkup: true});
- const result = consolidate(templateRenderer.render(`<${name}>${name}>`));
- const codes = (template.create() as unknown as SSRView).codes;
- strictEqual(result, `<${name} needs-hydration>