Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UIR Playground

Inspect what the interface means.

UIR Playground is the standalone developer tool for opening, rendering and inspecting UIR packages. It is intentionally separate from the UIR public site: the public site explains the project; this repository is the tool you use on real packages.

What you can test

  • Open a local UIR package folder.
  • Drop a local folder or .uir.zip archive anywhere on the Playground.
  • Load a public package.json, .uir.zip, or GitHub URL.
  • Inspect the semantic tree and select the same node in the rendered canvas.
  • Switch between Render, Semantics, Resolution, Provenance and Gaps views.
  • Inspect semantic facts, role → design-system resolution, presentation bindings, provenance and raw records.
  • View a semantic graph.
  • Set the current package as a baseline, load another package, and inspect a semantic diff.
  • Share a deep link for public remote packages.

Privacy model

Local folders and ZIP archives are read only in browser memory. There is no backend, upload endpoint, account or persistent storage: nothing is uploaded by the Playground.

Remote loading is explicit. When you enter a public URL or GitHub URL, the browser fetches that source directly. The remote host must allow CORS. Deep links contain only the remote URL; they never contain local package data.

ZIP loading rejects parent-path traversal, encrypted archives, ZIP64, more than 5,000 entries, and archives that expand beyond 64 MiB.

Package expectations

The loader looks for a UIR package.json manifest with formatVersion, packageId, packageVersion, and a model collection list. Model shards are loaded from the paths declared by the manifest, and a declared path that resolves outside the package is refused.

When a shard declares a sha256 ledger entry, the browser verifies it with Web Crypto before the shard is loaded: a mismatch, or a browser without Web Crypto, means the shard does not enter the package at all and Diagnostics says why. A shard that declares no ledger entry is loaded and reported as unverified — declaring nothing does not read as being sounder than declaring a hash and failing it.

The Playground currently treats UIR format 1.0 as its reference format. Other versions are opened on a best-effort basis and surfaced in Diagnostics.

Develop

npm install --no-audit --no-fund
npm run dev

Verification:

npm run check
npm test
npm run build

Deployment

The repository contains a GitHub Pages workflow. After the repository is made public and Pages is configured to use GitHub Actions, pushes to the default branch build and deploy the static Vite application.

Architecture

folder / .uir.zip / URL / GitHub
              │
              ▼
        source loaders
              │
              ▼
          UIRRuntime
       ┌──────┼──────┐
       ▼      ▼      ▼
    Inspect  Graph   Diff

The source layer is deliberately separate from UIRRuntime. Every source resolves to the same UIRPackageData, and Inspect/Graph/Diff consume the same semantic runtime instead of implementing separate parsers.

License

Apache-2.0.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages