@happyvertical/smrt-playground
v0.36.0
Published
Shared playground discovery, runtime, and host components for SMRT UI packages
Readme
@happyvertical/smrt-playground
Shared playground discovery, runtime helpers, and host components for SMRT UI packages.
Purpose
@happyvertical/smrt-playground powers the shared smrt playground experience. It discovers package-owned playground modules and renders them in a common host without forcing those packages to share a single route tree.
This package is about previews, not app routing.
Surface Model
SMRT UI packages can expose three different surfaces:
./sveltefor reusable components./playgroundfor preview metadata- package-local page shells under
src/svelte/routesandsrc/routeswhen needed
@happyvertical/smrt-playground consumes ./playground, not package route trees.
For this release, most UI packages should stop at ./svelte and ./playground. Route/page shells can stay package-local until there is a concrete downstream need to standardize a public route contract.
For the full convention, see docs/ui-surfaces.md.
Package-Owned Playground Modules
Packages opt in by defining src/svelte/playground.ts.
That module should:
- export stable preview entry IDs
- point at real package components
- provide mock fixtures or live configuration
- stay importable from workspace source for
smrt playground list
The shared host discovers these modules and renders them. Package pages do not need to be mounted into the shared playground.
Relationship To smrt playground
The smrt playground CLI commands are the public entry point.
smrt playground initsmrt playground devsmrt playground list
This package provides the runtime and host implementation behind those commands.
