@happyvertical/smrt-playground 0.55.17 → 0.55.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/agents/host.md +20 -0
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -46,3 +46,7 @@ The `smrt playground` commands (`init`, `dev`, `list`) consume this package. The
|
|
|
46
46
|
|
|
47
47
|
- See [`docs/ui-surfaces.md`](../../docs/ui-surfaces.md) for the full UI surface contract
|
|
48
48
|
- See [`docs/content/standards.md`](../../docs/content/standards.md) for monorepo conventions
|
|
49
|
+
|
|
50
|
+
## Visual baselines
|
|
51
|
+
|
|
52
|
+
The host's theme gallery has Chromium-on-macOS screenshot baselines. Update with `pnpm --filter smrt-playground-host test:e2e:update-snapshots`; details in [agents/host.md](agents/host.md). The spec skips pixel comparison off darwin (CI is Linux).
|
package/agents/host.md
CHANGED
|
@@ -18,6 +18,7 @@ Paths are relative to `host/`.
|
|
|
18
18
|
- `svelte.config.js` — `adapter-static` with `strict: false`, because the
|
|
19
19
|
playground routes are discovered at build time rather than prerendered
|
|
20
20
|
- `vite.config.ts` — wires the parent package's playground vite plugin
|
|
21
|
+
- `src/routes/theme-gallery/+page.svelte` — theme identity page (`?theme=&scheme=`); `e2e/theme-gallery.spec.ts` holds its visual baselines
|
|
21
22
|
- `e2e/shared-playground.spec.ts` — asserts the host boots and that no page or
|
|
22
23
|
console errors surface from any discovered playground entry
|
|
23
24
|
|
|
@@ -28,6 +29,25 @@ pnpm --dir packages/smrt-playground/host build
|
|
|
28
29
|
pnpm --dir packages/smrt-playground/host test:e2e
|
|
29
30
|
```
|
|
30
31
|
|
|
32
|
+
## Theme gallery and visual baselines
|
|
33
|
+
|
|
34
|
+
`/theme-gallery?theme=<preset>&scheme=light|dark` composes one screen (app shell with nav, account
|
|
35
|
+
menu and a dock tool, a form card, data table with a selected row, tabs, chips, badges, four alerts,
|
|
36
|
+
an open menu, a toast, heading stack and tabular figures) so every preset is reviewed on the same
|
|
37
|
+
content. `e2e/theme-gallery.spec.ts` screenshots five presets x light/dark at 1280 px plus five
|
|
38
|
+
phone (375 px, dark) variants and compares them (`maxDiffPixelRatio` 0.01).
|
|
39
|
+
|
|
40
|
+
Update baselines after an intentional visual change:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pnpm --filter smrt-playground-host test:e2e:update-snapshots
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Baselines in `e2e/theme-gallery.spec.ts-snapshots/` are Chromium on macOS (`*-darwin.png`). CI runs
|
|
47
|
+
on Linux, where text rendering differs, so the spec only asserts the page renders there and skips
|
|
48
|
+
pixel comparison when `process.platform !== 'darwin'`. Set `THEME_GALLERY_SHOTS_DIR` to also write
|
|
49
|
+
readable `<preset>-<scheme>-<width>.png` copies.
|
|
50
|
+
|
|
31
51
|
## Gotchas
|
|
32
52
|
|
|
33
53
|
- **Private and unpublished**: `private: true` at version `0.0.0`. It carries no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-playground",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.19",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Shared playground discovery, runtime, and host components for SMRT UI packages",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@happyvertical/smrt-ui": "0.55.
|
|
32
|
+
"@happyvertical/smrt-ui": "0.55.19",
|
|
33
33
|
"fast-glob": "3.3.3",
|
|
34
34
|
"tsx": "^4.23.13"
|
|
35
35
|
},
|