feat(sandbox): add Layout DSL (XLE/XLO) page#3211
Open
cixzhang wants to merge 1 commit into
Open
Conversation
Port the layout-grammar demo from the docsite Playground's 'Layout DSL' tab into the component sandbox as a standalone Tools page. Type a compressed XLE/XLO layout expression, validate it live against the @astryxdesign/core registry, see the expanded TSX with input/output token metrics, browse a searchable example library, and copy the expanded TSX to the clipboard. The registry is built at deploy time (generate-xle-registry.mjs) and the client-side token counter is esbuild-bundled (generate-xle-tokenizer.mjs), both wired into the sandbox 'generate' chain and gitignored, mirroring the docsite setup.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports the layout-grammar demo out of the docsite Playground and into the component sandbox as a standalone page.
The docsite Playground exposes the XLE/XLO layout language behind a "Layout DSL" tab (
XLEPanel). This PR gives that demo its own home inapps/sandboxso it can be exercised independently of the full playground shell.New page: Tools → Layout DSL (
/pages/layout-dsl/).What it does
@astryxdesign/coreregistry, with inline error banners + "did you mean" suggestions.The whole pipeline runs in-browser via the pure
@astryxdesign/cli/xlebarrel.How it's wired
XLEPanelis adapted into a self-contained page (no shared Monaco editor in the sandbox, so "Expand to code → preview" becomes "Copy expanded TSX").generatechain (mirroring the docsite):scripts/generate-xle-registry.mjs→src/generated/xle-registry.json(browser-safe registry; component.doc.mjsmetadata is Node-only).scripts/generate-xle-tokenizer.mjs→public/xle-tokenizer.mjs(esbuild-bundledgpt-tokenizero200k_base, heuristic fallback if unavailable — so the build never hard-fails on it).NEXT_PUBLIC_BASE_PATHso it resolves under the GitHub Pages sandbox deployment.Notes