@stnd/lab 0.2.0 → 1.0.0

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/README.md ADDED
@@ -0,0 +1,75 @@
1
+ ---
2
+ title: "@stnd/lab"
3
+ aliases: []
4
+ created: 2026-07-05 07:41
5
+ modified: 2026-07-05 19:22
6
+ last_audited: 2026-07-14
7
+ audit_interval_days: 90
8
+ next_audit: 2026-10-12
9
+ audit_priority: 3
10
+ maturity: sprout
11
+ mode: read
12
+ publish: false
13
+ status: active
14
+ tags:
15
+ - package
16
+ - stnd
17
+ theme: kernel
18
+ type: package
19
+ visibility: private
20
+ ---
21
+
22
+ # @[stnd](../README)/lab
23
+
24
+ Development tools and inspectors for the Standard Ecosystem.
25
+
26
+ ## ELI5
27
+
28
+ Press Cmd+S (or Ctrl+S) on any Standard site in dev mode and a panel slides open showing every CSS token in play — colors, spacing, type scale — editable live. It’s how you tune a theme by feel instead of guessing values and rebuilding.
29
+
30
+ **It’s already on** — `@stnd/lab` is a Gold Standard module, so any `@stnd/core` app gets it automatically in dev mode. Nothing to install.
31
+
32
+ ## Overview
33
+
34
+ `@stnd/lab` provides a set of tools designed to help developers inspect, debug, and refine their applications during development. Its primary component is the `Lab` inspector, which allows for real-time adjustments of design tokens and themes.
35
+
36
+ ## Key Components
37
+
38
+ - `Lab.svelte`: A comprehensive on-page inspector for CSS tokens, themes, and layouts.
39
+
40
+ ## Features
41
+
42
+ - **Token Inspector**: View and edit all active CSS custom properties in real-time.
43
+ - **Theme Switcher**: Instantly preview different themes from `@stnd/themes`.
44
+ - **Responsive Previews**: Toggle various viewport sizes and orientations.
45
+ - **Grid & Rhythm Overlays**: Visualize the baseline grid and golden ratio layout blocks.
46
+ - **Color Explorer**: Inspect OKLCH color palettes and contrast ratios.
47
+
48
+ ## Usage
49
+
50
+ The `Lab` component is typically injected automatically by the `@stnd/core` integration when in development mode. To include it manually:
51
+
52
+ ```svelte
53
+ <script>
54
+ import { Lab } from "@stnd/lab";
55
+ </script>
56
+
57
+ {#if import.meta.env.DEV}
58
+ <Lab />
59
+ {/if}
60
+ ```
61
+
62
+ ## Shortcuts
63
+ - `Cmd/Ctrl + S`: Toggle the Lab panel open/dormant (overrides the browser’s save dialog).
64
+ - `Cmd/Ctrl + D`: Same toggle, alternate binding.
65
+ - `Shift + Cmd/Ctrl + D`: Toggle debug overlays (`stnd-debug` class + on-page debug info), independent of the panel itself.
66
+
67
+ ## Notes / Observations
68
+
69
+ - `old.standard.lab.js` (1,545 lines) sits in this package unreferenced by
70
+ anything — looks like the pre-Svelte-5 predecessor to `Lab.svelte`.
71
+
72
+ ## Todo
73
+
74
+ - [ ] **Confirm `old.standard.lab.js` is dead and delete it** — nothing imports [priority:: 3] [token_scale:: 3] [created:: 2026-07-14] [area:: framework]
75
+ it; grep found zero references anywhere in the repo.