@happyvertical/smrt-playground 0.55.16 → 0.55.18

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 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
@@ -346,7 +346,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
346
346
  <div
347
347
  class="playground-shell"
348
348
  class:playground-shell--embedded={embedded}
349
- data-hydrated={isHydrated ? 'true' : 'false'}
349
+ data-hydrated={isHydrated ? 'true' : 'false'} data-smrt-component="PlaygroundHost"
350
350
  >
351
351
  {#if !embedded}
352
352
  <aside class="catalog-nav">
@@ -533,6 +533,8 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
533
533
  {/if}
534
534
 
535
535
  <style>
536
+ @layer smrt.reset, smrt.structure, smrt.theme;
537
+ @layer smrt.theme {
536
538
  :global(body) {
537
539
  margin: 0;
538
540
  min-height: 100vh;
@@ -1079,4 +1081,5 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
1079
1081
  animation: none;
1080
1082
  }
1081
1083
  }
1084
+ }
1082
1085
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-playground",
3
- "version": "0.55.16",
3
+ "version": "0.55.18",
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.16",
32
+ "@happyvertical/smrt-ui": "0.55.18",
33
33
  "fast-glob": "3.3.3",
34
34
  "tsx": "^4.23.13"
35
35
  },