diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..62c2215 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,49 @@ +name: Release and RC + +on: + push: + tags: + - "v*" + +permissions: + contents: read + +jobs: + publish: + name: Verify and publish + runs-on: ubuntu-latest + timeout-minutes: 30 + container: + image: mcr.microsoft.com/playwright:v1.65.1-noble + + steps: + - name: Check out tagged source + uses: actions/checkout@v4 + + - name: Configure Node and npm registry + uses: actions/setup-node@v4 + with: + node-version: "24" + registry-url: "https://registry.npmjs.org" + cache: "npm" + + - name: Install locked dependencies + run: npm ci + + - name: Verify tag and select npm channel + id: release + shell: bash + run: | + channel="$(node scripts/check-release-tag.mjs "${{ gitea.ref_name }}")" + echo "channel=${channel}" >> "${GITHUB_OUTPUT}" + + - name: Run the complete release contract + run: npm run test:release + + - name: Verify generated contracts are committed + run: git diff --exit-code -- utilities.css public-api.json package-lock.json + + - name: Publish package + run: npm publish --tag "${{ steps.release.outputs.channel }}" --access public + env: + NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}" diff --git a/.gitignore b/.gitignore index 5fd06d9..b6bfe2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ node_modules/ playwright-report/ test-results/ +.idea/ +dist/ +*.tgz diff --git a/CHANGELOG.md b/CHANGELOG.md index dce6c6f..0fcffdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.5.0 +## 1.0.0-rc.1 - Added a generated utility layer for layout, spacing, typography, colors, borders, shadows, responsive breakpoints, and interaction states. - Added standalone package exports for tokens, components, utilities, and base styles. @@ -9,6 +9,11 @@ - Expanded the example page and validation checks for the public API. - Added a generated public API manifest, breaking-change detection, release metadata validation, and isolated tarball consumer tests. - Added forced-colors support with system-color mappings, non-color state cues, catalog guidance, and component-level Playwright regressions. +- Made the built, import-free stylesheet the default package export while retaining modular source exports. +- Added Chromium, Firefox, and WebKit release coverage plus a real PostCSS tarball-consumer build. +- Added tag-verified npm release automation with `next` for release candidates and `latest` for stable releases. +- Added browser, SemVer, deprecation, migration, and release-candidate support contracts. +- Extended public API breaking-change detection to cover keyframe names. ## 0.4.0 diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..65a35cc --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,36 @@ +# Migrating from Frost 0.4 to 1.0 + +Frost 1.0 keeps the existing component and token names and adds a formal public API contract. The main packaging change is the default entrypoint. + +## Default import + +`@fretuks/frost` now resolves to the built, import-free `dist/frost.css` bundle. Existing imports normally continue to work: + +```css +@import "@fretuks/frost"; +``` + +If a build intentionally depended on the modular source entrypoint, use: + +```css +@import "@fretuks/frost/frost.css"; +``` + +The explicit `core`, `utility-layer`, `component-layer`, `tokens`, `components`, `utilities`, and `forced-colors` exports remain available. Bundled aliases are available as `@fretuks/frost/bundle` and `@fretuks/frost/bundle.min`. Import-free layer bundles are exported under `@fretuks/frost/dist/utility-layer.css` and `@fretuks/frost/dist/component-layer.css`, with matching `.min.css` variants. + +## New behavior to verify + +- Check custom themes in `forced-colors: active` and `prefers-contrast: more`. +- Confirm interactive code still synchronizes `hidden`, `aria-expanded`, tab selection, and dialog focus; Frost supplies styles rather than behavior. +- Review newly strengthened disabled, validation, current-page, and focus states. +- If application CSS targets internal selectors instead of documented `frost-*` classes and properties, move those overrides to the public semantic tokens. + +## Release-candidate installation + +Install the candidate without changing the stable npm tag: + +```bash +npm install @fretuks/frost@next +``` + +Run the application in Chromium, Firefox, and Safari/WebKit before promoting the exact candidate commit to `1.0.0`. diff --git a/README.md b/README.md index 14c0861..22d74c8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Frost ist eine kleine CSS-Basis für persönliche Websites und Web-Apps. Sie bringt Tokens, zugängliche Grundstyles, Utility-Klassen, Layout-Helfer, Controls und fertige Komponenten mit. Du kannst Frost also entweder eher wie Tailwind mit einzelnen Utilities oder eher wie Bootstrap mit Komponenten verwenden. +Die aktuelle 1.0-Vorabversion wird über den npm-Tag `next` veröffentlicht. Installiere sie mit `npm install @fretuks/frost@next`. Hinweise für bestehende 0.4-Projekte stehen in [MIGRATION.md](MIGRATION.md); Browser-, SemVer- und Deprecation-Verträge in [SUPPORT.md](SUPPORT.md). + ## Komponentenkatalog Der interaktive [Komponentenkatalog](examples/index.html) zeigt die öffentliche Komponenten-API mit echten Live-Beispielen, kopierbarem HTML und konkreten Accessibility-Hinweisen. Suche und Theme-Wechsel funktionieren direkt im Browser; Dropdowns, Tabs, Accordions und Modals demonstrieren das erwartete Tastatur- und Fokusverhalten. @@ -15,7 +17,7 @@ Frost hat bewusst getrennte Schichten: - `@fretuks/frost/core`: Tokens, Reset und Accessibility-Grundlagen - `@fretuks/frost/utility-layer`: Core plus Layout- und Utility-first-Klassen - `@fretuks/frost/component-layer`: Core plus Controls und fertige Komponenten -- `@fretuks/frost`: alle Schichten zusammen +- `@fretuks/frost`: gebündelte, import-freie Ausgabe mit allen Schichten Für eine statische Website: @@ -39,6 +41,8 @@ npm install @fretuks/frost @import "@fretuks/frost"; ``` +Der Standardimport zeigt auf `dist/frost.css`. Für die minifizierte Ausgabe gibt es `@fretuks/frost/bundle.min`; die modulare Quell-Entrypoint bleibt unter `@fretuks/frost/frost.css` verfügbar. + Für die Utility-Schicht: ```css @@ -272,7 +276,7 @@ npm pack --dry-run `prepack` erzeugt vor jedem Tarball die Utilities und `public-api.json` neu, baut alle Dateien unter `dist/` und prüft anschließend Version, Changelog und API-Vertrag. `npm run test:package` installiert den gebauten Tarball in ein isoliertes temporäres Consumer-Projekt und löst jeden Eintrag aus `package.json#exports` auf. -`public-api.json` ist die versionierte Baseline für alle öffentlichen `frost-*`-Klassen, `--frost-*`-Properties, CSS-Layer und Paket-Exports. Neue APIs werden mit `npm run generate:api` aufgenommen. Entfernte Klassen, Properties, Layer oder Exportpfade werden als Breaking Change abgelehnt. Für einen bewusst brechenden Release muss die Baseline explizit aktualisiert werden: +`public-api.json` ist die versionierte Baseline für alle öffentlichen `frost-*`-Klassen, `--frost-*`-Properties, Keyframes, CSS-Layer und Paket-Exports. Neue APIs werden mit `npm run generate:api` aufgenommen. Entfernte Klassen, Properties, Keyframes, Layer oder Exportpfade werden als Breaking Change abgelehnt. Für einen bewusst brechenden Release muss die Baseline explizit aktualisiert werden: ```bash npm run generate:api -- --allow-breaking @@ -283,11 +287,11 @@ Nach einer Generierung sollten `utilities.css` und `public-api.json` gemeinsam m Browser- und Accessibility-Regressionstests laufen mit Playwright und axe-core gegen die Beispielseite. Beim ersten Mal muss Chromium installiert werden: ```bash -npx playwright install chromium +npx playwright install chromium firefox webkit npm run test:browser ``` -Die Suite prüft Desktop- und Mobile-Ansichten, helle und dunkle Themes, Forced Colors, Tastaturinteraktionen und WCAG-A/AA-Regeln. Die Forced-Colors-Fälle kontrollieren zusätzlich Systemfarb-Mappings sowie sichtbare Fokus-, Fehler-, Auswahl- und Disabled-Zustände. Absichtliche visuelle Änderungen aktualisieren die gespeicherten Referenzbilder mit: +Die Suite prüft Chromium, Firefox und WebKit sowie Desktop- und Mobile-Ansichten, helle und dunkle Themes, Forced Colors, Tastaturinteraktionen und WCAG-A/AA-Regeln. Die Forced-Colors-Fälle kontrollieren zusätzlich Systemfarb-Mappings sowie sichtbare Fokus-, Fehler-, Auswahl- und Disabled-Zustände. Pixelbaselines bleiben bewusst Chromium-spezifisch; die anderen Engines laufen durch semantische, interaktive und Accessibility-Prüfungen. Absichtliche visuelle Änderungen aktualisieren die gespeicherten Referenzbilder mit: ```bash npm run test:browser:update @@ -295,6 +299,19 @@ npm run test:browser:update `npm run test:all` verbindet die schnellen Strukturprüfungen mit den Browser-Tests und ist der empfohlene CI-Einstiegspunkt. +## Release Candidate und Veröffentlichung + +Ein Release wird ausschließlich von einem Tag veröffentlicht, der exakt zur Version in `package.json`, `package-lock.json` und `CHANGELOG.md` passt. `scripts/check-release-tag.mjs` lehnt abweichende Tags ab. Vorabversionen wie `v1.0.0-rc.1` landen automatisch unter `next`; stabile Versionen wie `v1.0.0` unter `latest`. + +```bash +npm run check:tag -- v1.0.0-rc.1 +npm run test:release +git tag v1.0.0-rc.1 +git push origin v1.0.0-rc.1 +``` + +Die Gitea-Release-Action benötigt ein Repository-Secret `NPM_TOKEN` mit Publish-Rechten für `@fretuks/frost`. npm Trusted Publishing unterstützt die selbst gehostete Gitea-Instanz nicht; der Token sollte deshalb granular auf dieses Paket begrenzt und regelmäßig rotiert werden. Nach erfolgreicher RC-Prüfung wird dieselbe Commit-Basis auf `1.0.0` umgestellt, erneut vollständig getestet und als `v1.0.0` getaggt. + Neben dem vollständigen Paket können einzelne Schichten importiert werden: ```css diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..0a824f9 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,31 @@ +# Frost support contract + +## Browser baseline + +Frost 1.x supports evergreen browser engines from this minimum baseline: + +- Chromium 111, including Microsoft Edge 111 +- Firefox 113 +- Safari 16.4 and the corresponding WebKit generation + +The baseline is aligned with the modern CSS used by Frost, including cascade layers and `color-mix()`. Chromium, Firefox, and WebKit run semantic, interaction, axe, and rendering smoke tests. Forced-colors and increased-contrast assertions run when the engine exposes the relevant emulation and are feature-detected otherwise. Pixel snapshots remain Chromium-only so rendering-engine differences do not produce noisy baselines. + +Support means the public styles render and documented component states remain usable. It does not promise pixel-identical output between engines or operating systems. + +## Versioning and deprecation + +Frost follows Semantic Versioning after 1.0: + +- Patch releases fix bugs without intentionally changing the public contract. +- Minor releases may add classes, custom properties, keyframes, layers, and export paths. +- Major releases may remove or change public API after migration guidance has been published. + +Public classes, `--frost-*` custom properties, named keyframes, cascade layers, and package exports are recorded in `public-api.json`. A removal or export retarget is rejected unless the manifest is deliberately regenerated with `--allow-breaking`. + +Deprecations remain available for at least one minor release and are called out in the changelog before removal. Accessibility regressions are treated as bugs, not breaking changes. + +## Security and support requests + +Use the repository issue tracker for browser bugs, accessibility problems, and packaging defects. Do not include credentials, private npm tokens, or sensitive application data in reports. + +The project ships CSS and build-time validation scripts; it does not execute JavaScript in consumer applications. diff --git a/examples/index.html b/examples/index.html index b7cc2d9..eeff64e 100644 --- a/examples/index.html +++ b/examples/index.html @@ -24,7 +24,7 @@
-

Frost CSS Framework

Komponenten, die sich erklären.

Jedes Beispiel läuft mit echtem Frost-Markup. Kopiere den HTML-Ausschnitt, prüfe die Zustände und beachte den Accessibility-Vertrag.

9 von 9 GruppenVersion 0.5.0
+

Frost CSS Framework

Komponenten, die sich erklären.

Jedes Beispiel läuft mit echtem Frost-Markup. Kopiere den HTML-Ausschnitt, prüfe die Zustände und beachte den Accessibility-Vertrag.

9 von 9 GruppenVersion 1.0.0-rc.1
diff --git a/forced-colors.css b/forced-colors.css index eb49b46..8c9d96b 100644 --- a/forced-colors.css +++ b/forced-colors.css @@ -1,5 +1,5 @@ @layer frost.forced-colors { - @media (prefers-contrast: more) and (forced-colors: none) { + @media (prefers-contrast: more) { :where(.frost-button, .frost-input, .frost-select, .frost-textarea, .frost-card, .frost-surface, .frost-notice, .frost-alert, .frost-toast, .frost-dropdown__menu, .frost-popover__content, .frost-modal__content, .frost-pagination__item) { border-width: 2px; } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9c20905 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,278 @@ +{ + "name": "@fretuks/frost", + "version": "1.0.0-rc.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@fretuks/frost", + "version": "1.0.0-rc.1", + "license": "MIT", + "devDependencies": { + "@axe-core/playwright": "^4.14.0", + "@playwright/test": "^1.65.1", + "postcss": "^8.5.33", + "postcss-import": "^17.0.1" + } + }, + "node_modules/@axe-core/playwright": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.14.0.tgz", + "integrity": "sha512-SGUhG5PIHd2eMdpgBF2PyQLOhX+qyDR2PT4cmoS4Qk2ak+jX/rrSvst9l0PGv5WTHolKpUMvVmoHpr4cZgf1RQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.14.0" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, + "node_modules/@playwright/test": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", + "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/axe-core": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.1.tgz", + "integrity": "sha512-FHfa+lmNjQZfJz1q8wKqIDwC6DExcHt/pkjNQb09a3NPjCKg2rhu5qb2S4r76ASyFNNtuFooJpZe37OgudVGtQ==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-core-module": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.18.0.tgz", + "integrity": "sha512-qyax9fgaKOEC4qK8WZn7Q4IcoZC9RC1O1fFxRcRTq/oMMkWT/uXpqpXa12kzWR409zAt1drYN9N9BO26UmBCmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-17.0.1.tgz", + "integrity": "sha512-lthLZRa+sMc/xo+lG7TMUvOviwP9ngR0VULnvfXTyOE3JIc0mFrbjcubI6Jx52X+B3IKt9yfp6wwVWE768JezA==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=22.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/read-cache": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.2.tgz", + "integrity": "sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.14", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.14.tgz", + "integrity": "sha512-1ZjYvR9sbkiwC5+9QHetqW5HmA2pHRMaoupD01t2HlYnV/vydC2zPwLixhsMieSWVZt0JJRg5LVIk0Ow1D/TrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.18.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/package.json b/package.json index 71eeb4d..d75b636 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,20 @@ { "name": "@fretuks/frost", - "version": "0.5.0", + "version": "1.0.0-rc.1", "description": "A compact, semantic CSS foundation for websites and web applications.", - "style": "./frost.css", + "style": "./dist/frost.css", "exports": { - ".": "./frost.css", + ".": "./dist/frost.css", + "./bundle": "./dist/frost.css", + "./bundle.css": "./dist/frost.css", + "./bundle.min": "./dist/frost.min.css", + "./bundle.min.css": "./dist/frost.min.css", + "./dist/frost.css": "./dist/frost.css", + "./dist/frost.min.css": "./dist/frost.min.css", + "./dist/utility-layer.css": "./dist/utility-layer.css", + "./dist/utility-layer.min.css": "./dist/utility-layer.min.css", + "./dist/component-layer.css": "./dist/component-layer.css", + "./dist/component-layer.min.css": "./dist/component-layer.min.css", "./frost.css": "./frost.css", "./core.css": "./core.css", "./utility-layer.css": "./utility-layer.css", @@ -33,6 +43,8 @@ "dist/*.css", "README.md", "CHANGELOG.md", + "MIGRATION.md", + "SUPPORT.md", "LICENSE", "public-api.json", "scripts/*.mjs" @@ -51,12 +63,25 @@ "url": "https://git.bachmannj.ch/Fretux/Frost.git" }, "homepage": "https://git.bachmannj.ch/Fretux/Frost", + "bugs": { + "url": "https://git.bachmannj.ch/Fretux/Frost/issues" + }, + "publishConfig": { + "access": "public" + }, + "browserslist": [ + "Chrome >= 111", + "Edge >= 111", + "Firefox >= 113", + "Safari >= 16.4" + ], "scripts": { "lint": "node scripts/check.mjs", "size": "node scripts/size.mjs", "build": "node scripts/build.mjs", "check:api": "node scripts/public-api.mjs --check", "check:release": "node scripts/check-release.mjs && npm run check:api", + "check:tag": "node scripts/check-release-tag.mjs", "generate:api": "node scripts/public-api.mjs --write", "test": "node scripts/check.mjs && node scripts/check-example.mjs", "test:all": "npm test && npm run test:browser", @@ -64,12 +89,15 @@ "test:browser:update": "playwright test --update-snapshots", "test:example": "node scripts/check-example.mjs", "test:package": "npm run prepack && node scripts/test-package.mjs", + "test:release": "npm run test:all && npm run size && npm run test:package && npm pack --dry-run", "generate:utilities": "node scripts/generate-utilities.mjs", "prepack": "npm run generate:utilities && npm run generate:api && npm run build && npm run check:release" }, "sideEffects": true, "devDependencies": { "@axe-core/playwright": "^4.14.0", - "@playwright/test": "^1.65.1" + "@playwright/test": "^1.65.1", + "postcss": "^8.5.33", + "postcss-import": "^17.0.1" } } diff --git a/playwright.config.mjs b/playwright.config.mjs index aa9d723..a221c26 100644 --- a/playwright.config.mjs +++ b/playwright.config.mjs @@ -38,6 +38,20 @@ export default defineConfig({ colorScheme: "light", }, }, + { + name: "desktop-firefox", + use: { + ...devices["Desktop Firefox"], + colorScheme: "light", + }, + }, + { + name: "desktop-webkit", + use: { + ...devices["Desktop Safari"], + colorScheme: "light", + }, + }, ], webServer: { command: "node tests/browser/serve-example.mjs", diff --git a/public-api.json b/public-api.json index a9cf40d..b9979bb 100644 --- a/public-api.json +++ b/public-api.json @@ -1,6 +1,6 @@ { - "schemaVersion": 1, - "packageVersion": "0.5.0", + "schemaVersion": 2, + "packageVersion": "1.0.0-rc.1", "classes": [ "frost-absolute", "frost-accordion", @@ -562,6 +562,10 @@ "--frost-z-popover", "--frost-z-toast" ], + "keyframes": [ + "frost-control-loading", + "frost-spin" + ], "layers": [ "frost.tokens", "frost.base", @@ -573,10 +577,14 @@ "frost.forced-colors" ], "exports": { - ".": "./frost.css", + ".": "./dist/frost.css", "./accessibility.css": "./accessibility.css", "./base": "./base.css", "./base.css": "./base.css", + "./bundle": "./dist/frost.css", + "./bundle.css": "./dist/frost.css", + "./bundle.min": "./dist/frost.min.css", + "./bundle.min.css": "./dist/frost.min.css", "./component-layer": "./component-layer.css", "./component-layer.css": "./component-layer.css", "./components": "./components.css", @@ -584,6 +592,12 @@ "./controls.css": "./controls.css", "./core": "./core.css", "./core.css": "./core.css", + "./dist/component-layer.css": "./dist/component-layer.css", + "./dist/component-layer.min.css": "./dist/component-layer.min.css", + "./dist/frost.css": "./dist/frost.css", + "./dist/frost.min.css": "./dist/frost.min.css", + "./dist/utility-layer.css": "./dist/utility-layer.css", + "./dist/utility-layer.min.css": "./dist/utility-layer.min.css", "./forced-colors": "./forced-colors.css", "./forced-colors.css": "./forced-colors.css", "./frost.css": "./frost.css", diff --git a/scripts/check-release-tag.mjs b/scripts/check-release-tag.mjs new file mode 100644 index 0000000..aac4931 --- /dev/null +++ b/scripts/check-release-tag.mjs @@ -0,0 +1,19 @@ +import { readFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = fileURLToPath(new URL("..", import.meta.url)); +const packageJson = JSON.parse(await readFile(resolve(root, "package.json"), "utf8")); +const suppliedTag = process.argv[2] ?? process.env.GITEA_REF_NAME ?? process.env.GITHUB_REF_NAME; +const expectedTag = `v${packageJson.version}`; + +if (!suppliedTag) { + console.error("Release tag is required as an argument or through GITEA_REF_NAME/GITHUB_REF_NAME."); + process.exitCode = 1; +} else if (suppliedTag !== expectedTag) { + console.error(`Release tag ${suppliedTag} does not match package version ${packageJson.version}; expected ${expectedTag}.`); + process.exitCode = 1; +} else { + const channel = packageJson.version.includes("-") ? "next" : "latest"; + console.log(channel); +} diff --git a/scripts/check-release.mjs b/scripts/check-release.mjs index e4387f8..d66f6b6 100644 --- a/scripts/check-release.mjs +++ b/scripts/check-release.mjs @@ -14,6 +14,13 @@ if (packageLock.name !== packageJson.name) errors.push(`package-lock.json: packa if (packageLock.version !== packageJson.version) errors.push(`package-lock.json: version ${packageLock.version} does not match ${packageJson.version}`); if (packageLock.packages?.[""]?.name !== packageJson.name) errors.push("package-lock.json: root package name is stale"); if (packageLock.packages?.[""]?.version !== packageJson.version) errors.push("package-lock.json: root package version is stale"); +if (packageJson.publishConfig?.access !== "public") errors.push("package.json: publishConfig.access must be public"); +for (const requiredFile of ["README.md", "CHANGELOG.md", "MIGRATION.md", "SUPPORT.md", "public-api.json"]) { + if (!packageJson.files?.includes(requiredFile)) errors.push(`package.json: files must include ${requiredFile}`); +} +for (const browser of ["Chrome >= 111", "Edge >= 111", "Firefox >= 113", "Safari >= 16.4"]) { + if (!packageJson.browserslist?.includes(browser)) errors.push(`package.json: browserslist is missing ${browser}`); +} const releases = [...changelog.matchAll(/^##\s+\[?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\]?\s*$/gm)].map((match) => ({ version: match[1], index: match.index })); if (!releases.length) errors.push("CHANGELOG.md: no release headings found"); diff --git a/scripts/check.mjs b/scripts/check.mjs index 01ff50e..c59db6d 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -71,6 +71,11 @@ for (const exportPath of ["./core", "./utility-layer", "./component-layer"]) { for (const exportPath of ["./forced-colors", "./forced-colors.css"]) { if (!packageJson.exports[exportPath]) errors.push(`package.json: missing forced-colors export ${exportPath}`); } +if (packageJson.style !== "./dist/frost.css") errors.push("package.json: style must point to the built dist/frost.css bundle"); +if (packageJson.exports["."] !== "./dist/frost.css") errors.push("package.json: default export must point to the built dist/frost.css bundle"); +for (const exportPath of ["./bundle", "./bundle.css", "./bundle.min", "./bundle.min.css", "./dist/frost.css", "./dist/frost.min.css", "./dist/utility-layer.css", "./dist/utility-layer.min.css", "./dist/component-layer.css", "./dist/component-layer.min.css"]) { + if (!packageJson.exports[exportPath]) errors.push(`package.json: missing bundled export ${exportPath}`); +} if (errors.length) { console.error(errors.join("\n")); diff --git a/scripts/public-api.mjs b/scripts/public-api.mjs index 6bdfee5..843a575 100644 --- a/scripts/public-api.mjs +++ b/scripts/public-api.mjs @@ -17,16 +17,18 @@ for (const match of combinedCss.matchAll(/\.(frost-[A-Za-z0-9_-]+(?:\\:[A-Za-z0- } const customProperties = new Set(combinedCss.match(/--frost-[a-z0-9-]+/g) ?? []); +const keyframes = new Set([...combinedCss.matchAll(/@keyframes\s+([A-Za-z0-9_-]+)/g)].map((match) => match[1])); const entryCss = await readFile(resolve(root, "frost.css"), "utf8"); const layerDeclaration = entryCss.match(/@layer\s+([^;]+);/); const layers = layerDeclaration ? layerDeclaration[1].split(",").map((layer) => layer.trim()) : []; const packageExports = Object.fromEntries(sortLexically(Object.keys(packageJson.exports)).map((key) => [key, packageJson.exports[key]])); const currentManifest = { - schemaVersion: 1, + schemaVersion: 2, packageVersion: packageJson.version, classes: sortLexically(classes), customProperties: sortLexically(customProperties), + keyframes: sortLexically(keyframes), layers, exports: packageExports, }; @@ -50,6 +52,9 @@ const findBreakingChanges = (baseline, current) => { for (const property of baseline.customProperties ?? []) { if (!current.customProperties.includes(property)) changes.push(`removed custom property ${property}`); } + for (const keyframe of baseline.keyframes ?? []) { + if (!current.keyframes.includes(keyframe)) changes.push(`removed keyframes ${keyframe}`); + } for (const [key, target] of Object.entries(baseline.exports ?? {})) { if (!(key in current.exports)) changes.push(`removed package export ${key}`); else if (current.exports[key] !== target) changes.push(`changed package export ${key}: ${target} -> ${current.exports[key]}`); @@ -76,7 +81,7 @@ if (!command) { const next = serialize(currentManifest); const previous = existingManifest ? serialize(existingManifest) : null; if (next !== previous) await writeFile(manifestPath, next); - console.log(`Public API manifest contains ${currentManifest.classes.length} classes, ${currentManifest.customProperties.length} custom properties, and ${Object.keys(currentManifest.exports).length} exports.`); + console.log(`Public API manifest contains ${currentManifest.classes.length} classes, ${currentManifest.customProperties.length} custom properties, ${currentManifest.keyframes.length} keyframes, and ${Object.keys(currentManifest.exports).length} exports.`); } } else if (!existingManifest) { console.error("public-api.json is missing. Run npm run generate:api."); @@ -85,11 +90,12 @@ if (!command) { const additions = [ ...currentManifest.classes.filter((value) => !existingManifest.classes.includes(value)).map((value) => `added class .${value}`), ...currentManifest.customProperties.filter((value) => !existingManifest.customProperties.includes(value)).map((value) => `added custom property ${value}`), + ...currentManifest.keyframes.filter((value) => !(existingManifest.keyframes ?? []).includes(value)).map((value) => `added keyframes ${value}`), ...Object.keys(currentManifest.exports).filter((value) => !(value in existingManifest.exports)).map((value) => `added package export ${value}`), ]; console.error(["public-api.json does not match the current CSS/package surface.", ...breakingChanges.map((change) => `BREAKING: ${change}`), ...additions.map((change) => `NEW: ${change}`), "Run npm run generate:api and commit the result."].join("\n")); process.exitCode = 1; } else { - console.log(`Public API contract is current: ${currentManifest.classes.length} classes, ${currentManifest.customProperties.length} custom properties, ${Object.keys(currentManifest.exports).length} exports.`); + console.log(`Public API contract is current: ${currentManifest.classes.length} classes, ${currentManifest.customProperties.length} custom properties, ${currentManifest.keyframes.length} keyframes, ${Object.keys(currentManifest.exports).length} exports.`); } } diff --git a/scripts/test-package.mjs b/scripts/test-package.mjs index d7b5cee..0a2e845 100644 --- a/scripts/test-package.mjs +++ b/scripts/test-package.mjs @@ -5,12 +5,13 @@ import { basename, join, resolve, sep } from "node:path"; import { createRequire } from "node:module"; import { promisify } from "node:util"; import { fileURLToPath } from "node:url"; +import postcss from "postcss"; +import postcssImport from "postcss-import"; const execFileAsync = promisify(execFile); const root = fileURLToPath(new URL("..", import.meta.url)); const packageJson = JSON.parse(await readFile(resolve(root, "package.json"), "utf8")); const temporaryRoot = await mkdtemp(join(tmpdir(), "frost-consumer-")); -const fixture = join(temporaryRoot, "fixture"); const npmCli = process.env.npm_execpath; const runNpm = async (arguments_, options = {}) => { @@ -29,7 +30,7 @@ try { const path = target.replace(/^\.\//, ""); if (!packedPaths.has(path)) throw new Error(`Tarball is missing export target ${target}`); } - for (const required of ["public-api.json", "dist/frost.css", "dist/frost.min.css", "dist/utility-layer.css", "dist/component-layer.css"]) { + for (const required of ["public-api.json", "SUPPORT.md", "MIGRATION.md", "dist/frost.css", "dist/frost.min.css", "dist/utility-layer.css", "dist/component-layer.css"]) { if (!packedPaths.has(required)) throw new Error(`Tarball is missing required file ${required}`); } const forbidden = [...packedPaths].filter((path) => /^(?:examples|tests|\.gitea|node_modules)\//.test(path)); @@ -52,8 +53,20 @@ try { if (!metadata.isFile() || metadata.size === 0) throw new Error(`${specifier} resolved to an empty or non-file target`); } + const consumerCss = join(temporaryRoot, "consumer.css"); + await writeFile(consumerCss, `@import "${packageJson.name}";\n.consumer-smoke { color: var(--frost-color-text); }\n`); + const bundledConsumer = await postcss([ + postcssImport({ + resolve: (specifier) => requireFromFixture.resolve(specifier), + }), + ]).process(await readFile(consumerCss, "utf8"), { from: consumerCss }); + if (/@import\b/.test(bundledConsumer.css)) throw new Error("Bundled default export left unresolved CSS imports in the consumer build"); + for (const marker of [".frost-button", "@layer frost.forced-colors", "@media (forced-colors: active)", ".consumer-smoke"]) { + if (!bundledConsumer.css.includes(marker)) throw new Error(`Bundled consumer output is missing ${marker}`); + } + const tarballMetadata = await stat(tarball); - console.log(`Installed ${basename(tarball)} (${tarballMetadata.size} bytes) and resolved all ${Object.keys(packageJson.exports).length} package exports from an isolated consumer.`); + console.log(`Installed ${basename(tarball)} (${tarballMetadata.size} bytes), resolved all ${Object.keys(packageJson.exports).length} exports, and bundled the default CSS from an isolated consumer.`); } finally { if (!resolve(temporaryRoot).startsWith(resolve(tmpdir()) + sep)) throw new Error("Refusing to remove a temporary directory outside the system temp root"); await rm(temporaryRoot, { recursive: true, force: true }); diff --git a/tests/browser/example.spec.mjs b/tests/browser/example.spec.mjs index 8b3d7c3..bde6181 100644 --- a/tests/browser/example.spec.mjs +++ b/tests/browser/example.spec.mjs @@ -37,7 +37,8 @@ const visualCases = [ ]; for (const visualCase of visualCases) { - test(`${visualCase.name} matches its component baselines`, async ({ page }) => { + test(`${visualCase.name} matches its component baselines`, async ({ page, browserName }) => { + test.skip(browserName !== "chromium", "Pixel baselines are intentionally pinned to Chromium; other engines run behavioral and accessibility coverage."); await page.addStyleTag({ content: ".frost-skip-link { display: none !important; }" }); for (const theme of ["light", "dark"]) { await page.locator("html").evaluate((element, selectedTheme) => { @@ -49,7 +50,8 @@ for (const visualCase of visualCases) { } }); - test(`${visualCase.name} matches its forced-colors baseline`, async ({ page }) => { + test(`${visualCase.name} matches its forced-colors baseline`, async ({ page, browserName }) => { + test.skip(browserName !== "chromium", "Forced-colors pixel baselines are intentionally pinned to Chromium."); await page.emulateMedia({ colorScheme: "light", forcedColors: "active" }); await page.addStyleTag({ content: ".frost-skip-link { display: none !important; }" }); await visualCase.prepare?.(page); @@ -150,6 +152,8 @@ test("modal restores focus to its trigger after closing", async ({ page }) => { test("forced colors preserves system mappings and non-color state cues", async ({ page }) => { await page.emulateMedia({ colorScheme: "light", forcedColors: "active" }); + const supportsForcedColors = await page.evaluate(() => matchMedia("(forced-colors: active)").matches && CSS.supports("forced-color-adjust: none")); + test.skip(!supportsForcedColors, "This browser engine does not expose forced-color-adjust with forced-colors emulation."); const primary = page.locator("#buttons .frost-button--primary").first(); const disabled = page.locator("#buttons .frost-button:disabled"); @@ -196,6 +200,9 @@ test("forced colors preserves system mappings and non-color state cues", async ( test("increased contrast strengthens component boundaries and states", async ({ page }) => { await page.emulateMedia({ colorScheme: "light", contrast: "more", forcedColors: "none" }); + const supportsIncreasedContrast = await page.evaluate(() => matchMedia("(prefers-contrast: more)").matches + && Number.parseFloat(getComputedStyle(document.querySelector("#buttons .frost-button--primary")).borderWidth) >= 2); + test.skip(!supportsIncreasedContrast, "This browser engine does not expose prefers-contrast emulation."); const states = await page.evaluate(() => { const style = (selector) => getComputedStyle(document.querySelector(selector)); @@ -220,3 +227,26 @@ test("increased contrast strengthens component boundaries and states", async ({ expect(states.selectedBorderWidth).toBeGreaterThanOrEqual(3); }); +test("renders the framework smoke fixture", async ({ page, browserName }) => { + const rendering = await page.evaluate(() => { + const button = getComputedStyle(document.querySelector("#buttons .frost-button--primary")); + const card = getComputedStyle(document.querySelector("#surfaces .frost-card")); + const dialog = getComputedStyle(document.querySelector("#example-dialog")); + return { + buttonDisplay: button.display, + buttonMinHeight: Number.parseFloat(button.minHeight), + cardDisplay: card.display, + cardBorderStyle: card.borderStyle, + closedDialogDisplay: dialog.display, + }; + }); + + expect(rendering, `${browserName} framework rendering`).toEqual({ + buttonDisplay: "flex", + buttonMinHeight: 40, + cardDisplay: "block", + cardBorderStyle: "solid", + closedDialogDisplay: "none", + }); +}); + diff --git a/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..bc7d7e8 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..671c0b8 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..1a89baa Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..57531b2 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-buttons-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-linux.png new file mode 100644 index 0000000..12d8b57 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-win32.png new file mode 100644 index 0000000..d93f762 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-linux.png new file mode 100644 index 0000000..7701607 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-win32.png new file mode 100644 index 0000000..69f5560 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-dark-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..08db567 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..e0330b8 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..8ac9e64 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..6fd614d Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-linux.png new file mode 100644 index 0000000..51f9f7b Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-win32.png new file mode 100644 index 0000000..7c7616f Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-linux.png new file mode 100644 index 0000000..570a626 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-win32.png new file mode 100644 index 0000000..184cff4 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-contrast-guide-light-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..f2a7a96 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..dcc770c Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..9064267 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..f477ca6 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-data-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..c0fe76c Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..2105911 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..60e07d9 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..6403ce8 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-disclosure-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..42754ce Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..f343936 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..1530e34 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..d4b0e2b Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-feedback-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..dfa811a Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..e846a60 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..26bd26e Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..ac20d47 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-forms-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..ba49db7 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..6b29147 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..a725c05 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..d866b38 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-menus-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..b141eea Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..36a7488 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..ed39c72 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..5064ad2 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-modal-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..8d399c9 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..42882ad Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..04cd1ea Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..141c25a Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-navigation-forced-colors-mobile-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-linux.png new file mode 100644 index 0000000..4c1e339 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-win32.png new file mode 100644 index 0000000..ef19b68 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-desktop-chromium-win32.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-linux.png b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-linux.png new file mode 100644 index 0000000..ef7ad41 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-linux.png differ diff --git a/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-win32.png b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-win32.png new file mode 100644 index 0000000..2d7d358 Binary files /dev/null and b/tests/browser/example.spec.mjs-snapshots/component-surfaces-forced-colors-mobile-chromium-win32.png differ