The Open Standard for Generative UI
Document Inspect and Debug under Advanced, and drop the Paste sidebar link. (#1021)
AB275eb488b1d4
diff --git a/docs/app/paste/components/Banner.tsx b/docs/app/debug/components/Banner.tsxsimilarity index 100%rename from docs/app/paste/components/Banner.tsxrename to docs/app/debug/components/Banner.tsxdiff --git a/docs/app/paste/components/EditorPane.tsx b/docs/app/debug/components/EditorPane.tsxsimilarity index 100%rename from docs/app/paste/components/EditorPane.tsxrename to docs/app/debug/components/EditorPane.tsxdiff --git a/docs/app/paste/components/HelpDialog.tsx b/docs/app/debug/components/HelpDialog.tsxsimilarity index 93%rename from docs/app/paste/components/HelpDialog.tsxrename to docs/app/debug/components/HelpDialog.tsxindex 23f6e8a6f..57b33ef4f 100644--- a/docs/app/paste/components/HelpDialog.tsx+++ b/docs/app/debug/components/HelpDialog.tsx@@ -24,8 +24,8 @@ export function HelpDialog() {size="small"onClick={() => setOpen(true)}aria-haspopup="dialog"- aria-label="How to use paste"- title="How to use paste"+ aria-label="How to use Debug"+ title="How to use Debug"><HelpCircle size={16} /></Button>@@ -35,11 +35,11 @@ export function HelpDialog() {className={styles.helpDialog}role="dialog"aria-modal="true"- aria-label="How to use paste"+ aria-label="How to use Debug"onClick={(e) => e.stopPropagation()}><div className={styles.helpHeader}>- <h2>How to use Paste</h2>+ <h2>How to use Debug</h2><Buttonvariant="tertiary"size="small"@@ -51,7 +51,7 @@ export function HelpDialog() {<div className={styles.helpBody}><p>- Paste is a playground for <strong>OpenUI Lang</strong>. Paste code on the left; the+ Debug is a playground for <strong>OpenUI Lang</strong>. Put code on the left; thepanels on the right show what the parser and renderer make of it.</p>diff --git a/docs/app/paste/components/Playground.tsx b/docs/app/debug/components/Playground.tsxsimilarity index 100%rename from docs/app/paste/components/Playground.tsxrename to docs/app/debug/components/Playground.tsxdiff --git a/docs/app/paste/components/RenderErrorBoundary.tsx b/docs/app/debug/components/RenderErrorBoundary.tsxsimilarity index 100%rename from docs/app/paste/components/RenderErrorBoundary.tsxrename to docs/app/debug/components/RenderErrorBoundary.tsxdiff --git a/docs/app/paste/components/StreamControls.tsx b/docs/app/debug/components/StreamControls.tsxsimilarity index 100%rename from docs/app/paste/components/StreamControls.tsxrename to docs/app/debug/components/StreamControls.tsxdiff --git a/docs/app/paste/components/Toasts.tsx b/docs/app/debug/components/Toasts.tsxsimilarity index 100%rename from docs/app/paste/components/Toasts.tsxrename to docs/app/debug/components/Toasts.tsxdiff --git a/docs/app/paste/components/Toolbar.tsx b/docs/app/debug/components/Toolbar.tsxsimilarity index 98%rename from docs/app/paste/components/Toolbar.tsxrename to docs/app/debug/components/Toolbar.tsxindex f29aaced9..69f9e87bb 100644--- a/docs/app/paste/components/Toolbar.tsx+++ b/docs/app/debug/components/Toolbar.tsx@@ -23,7 +23,7 @@ import type { LoadedLangCore } from "@paste/lib/versions/types";import { HelpDialog } from "./HelpDialog";import { PlaybackButtons, StreamSettingsFields } from "./StreamControls";// The docs site's own toggle (animated sun/moon, phosphor icons) — same one-// as the homepage header, so /paste matches the rest of the site.+// as the homepage header, so /debug matches the rest of the site.import { ThemeToggle } from "@/components/theme-toggle";import { VersionPicker } from "./VersionPicker";import styles from "@paste/paste.module.css";@@ -139,7 +139,7 @@ export function Toolbar({<span>Back to docs</span></Link><div className={styles.topbarRight}>- <span className={styles.toolbarLogo}>OpenUI Paste</span>+ <span className={styles.toolbarLogo}>OpenUI Debug</span><ThemeToggle /></div></header>diff --git a/docs/app/paste/components/VersionPicker.tsx b/docs/app/debug/components/VersionPicker.tsxsimilarity index 100%rename from docs/app/paste/components/VersionPicker.tsxrename to docs/app/debug/components/VersionPicker.tsxdiff --git a/docs/app/paste/components/panels/JsonPanel.tsx b/docs/app/debug/components/panels/JsonPanel.tsxsimilarity index 100%rename from docs/app/paste/components/panels/JsonPanel.tsxrename to docs/app/debug/components/panels/JsonPanel.tsxdiff --git a/docs/app/paste/components/panels/RenderPanel.tsx b/docs/app/debug/components/panels/RenderPanel.tsxsimilarity index 100%rename from docs/app/paste/components/panels/RenderPanel.tsxrename to docs/app/debug/components/panels/RenderPanel.tsxdiff --git a/docs/app/paste/components/panels/StreamTimeline.tsx b/docs/app/debug/components/panels/StreamTimeline.tsxsimilarity index 100%rename from docs/app/paste/components/panels/StreamTimeline.tsxrename to docs/app/debug/components/panels/StreamTimeline.tsxdiff --git a/docs/app/paste/components/panels/TreePanel.tsx b/docs/app/debug/components/panels/TreePanel.tsxsimilarity index 100%rename from docs/app/paste/components/panels/TreePanel.tsxrename to docs/app/debug/components/panels/TreePanel.tsxdiff --git a/docs/app/paste/components/panels/ValidationPanel.tsx b/docs/app/debug/components/panels/ValidationPanel.tsxsimilarity index 97%rename from docs/app/paste/components/panels/ValidationPanel.tsxrename to docs/app/debug/components/panels/ValidationPanel.tsxindex 049c35c84..c545eed4c 100644--- a/docs/app/paste/components/panels/ValidationPanel.tsx+++ b/docs/app/debug/components/panels/ValidationPanel.tsx@@ -27,7 +27,7 @@ export function ValidationPanel({ outcome }: { outcome: ValidationOutcome }) {);}if (!result)- return <div className={styles.panelEmpty}>Paste some OpenUI Lang code to validate it.</div>;+ return <div className={styles.panelEmpty}>Add some OpenUI Lang to validate it.</div>;const { meta } = result;const groups = groupByCode(meta.errors);diff --git a/docs/app/paste/hooks/useMediaQuery.ts b/docs/app/debug/hooks/useMediaQuery.tssimilarity index 100%rename from docs/app/paste/hooks/useMediaQuery.tsrename to docs/app/debug/hooks/useMediaQuery.tsdiff --git a/docs/app/paste/hooks/useValidation.ts b/docs/app/debug/hooks/useValidation.tssimilarity index 100%rename from docs/app/paste/hooks/useValidation.tsrename to docs/app/debug/hooks/useValidation.tsdiff --git a/docs/app/paste/hooks/useVersionList.ts b/docs/app/debug/hooks/useVersionList.tssimilarity index 100%rename from docs/app/paste/hooks/useVersionList.tsrename to docs/app/debug/hooks/useVersionList.tsdiff --git a/docs/app/paste/layout.tsx b/docs/app/debug/layout.tsxsimilarity index 54%rename from docs/app/paste/layout.tsxrename to docs/app/debug/layout.tsxindex 1a4e09615..bce6746ee 100644--- a/docs/app/paste/layout.tsx+++ b/docs/app/debug/layout.tsx@@ -3,11 +3,11 @@ import type { Metadata } from "next";import type { ReactNode } from "react";export const metadata: Metadata = {- title: "OpenUI Paste",+ title: "OpenUI Debug",description:- "Paste OpenUI Lang code, validate it against any published @openuidev/lang-core version, replay it as a simulated LLM stream, and see what renders.",+ "Try OpenUI Lang against any published @openuidev/lang-core version, replay it as a simulated LLM stream, and see what renders.",};-export default function PasteLayout({ children }: { children: ReactNode }) {+export default function DebugLayout({ children }: { children: ReactNode }) {return <WebsiteThemeProvider>{children}</WebsiteThemeProvider>;}diff --git a/docs/app/paste/lib/editor/hover.ts b/docs/app/debug/lib/editor/hover.tssimilarity index 100%rename from docs/app/paste/lib/editor/hover.tsrename to docs/app/debug/lib/editor/hover.tsdiff --git a/docs/app/paste/lib/editor/openui-lang.ts b/docs/app/debug/lib/editor/openui-lang.tssimilarity index 100%rename from docs/app/paste/lib/editor/openui-lang.tsrename to docs/app/debug/lib/editor/openui-lang.tsdiff --git a/docs/app/paste/lib/examples.ts b/docs/app/debug/lib/examples.tssimilarity index 97%rename from docs/app/paste/lib/examples.tsrename to docs/app/debug/lib/examples.tsindex 6dfcfaaab..5a4b609ea 100644--- a/docs/app/paste/lib/examples.ts+++ b/docs/app/debug/lib/examples.ts@@ -48,7 +48,7 @@ pic = Image()label: "Kitchen sink (form + table + chart)",code: `root = Stack([title, note, form, tbl, chart])-title = TextContent("paste playground", "large-heavy")+title = TextContent("debug playground", "large-heavy")note = Callout("info", "Demo", "A form with validation, a table and a chart — rendered fully client-side.")form = Form("contact", btns, [nameField, emailField])nameField = FormControl("Name", Input("name", "Your name", "text", { required: true, minLength: 2 }))diff --git a/docs/app/paste/lib/groupErrors.ts b/docs/app/debug/lib/groupErrors.tssimilarity index 100%rename from docs/app/paste/lib/groupErrors.tsrename to docs/app/debug/lib/groupErrors.tsdiff --git a/docs/app/paste/lib/libraries.ts b/docs/app/debug/lib/libraries.tssimilarity index 100%rename from docs/app/paste/lib/libraries.tsrename to docs/app/debug/lib/libraries.tsdiff --git a/docs/app/paste/lib/mockTools.ts b/docs/app/debug/lib/mockTools.tssimilarity index 96%rename from docs/app/paste/lib/mockTools.tsrename to docs/app/debug/lib/mockTools.tsindex f37cd7427..5179bdc01 100644--- a/docs/app/paste/lib/mockTools.ts+++ b/docs/app/debug/lib/mockTools.ts@@ -5,7 +5,7 @@*/const CANNED_RESULT = {status: "ok",- note: "Mock response from the paste playground — tools are not connected.",+ note: "Mock response from the Debug playground — tools are not connected.",items: [{ id: 1, label: "Alpha", value: 42 },{ id: 2, label: "Beta", value: 17 },diff --git a/docs/app/paste/lib/parse.ts b/docs/app/debug/lib/parse.tssimilarity index 100%rename from docs/app/paste/lib/parse.tsrename to docs/app/debug/lib/parse.tsdiff --git a/docs/app/paste/lib/streaming/chunker.ts b/docs/app/debug/lib/streaming/chunker.tssimilarity index 100%rename from docs/app/paste/lib/streaming/chunker.tsrename to docs/app/debug/lib/streaming/chunker.tsdiff --git a/docs/app/paste/lib/streaming/usePlayback.ts b/docs/app/debug/lib/streaming/usePlayback.tssimilarity index 100%rename from docs/app/paste/lib/streaming/usePlayback.tsrename to docs/app/debug/lib/streaming/usePlayback.tsdiff --git a/docs/app/paste/lib/versions/loader.ts b/docs/app/debug/lib/versions/loader.tssimilarity index 100%rename from docs/app/paste/lib/versions/loader.tsrename to docs/app/debug/lib/versions/loader.tsdiff --git a/docs/app/paste/lib/versions/registry.ts b/docs/app/debug/lib/versions/registry.tssimilarity index 100%rename from docs/app/paste/lib/versions/registry.tsrename to docs/app/debug/lib/versions/registry.tsdiff --git a/docs/app/paste/lib/versions/types.ts b/docs/app/debug/lib/versions/types.tssimilarity index 100%rename from docs/app/paste/lib/versions/types.tsrename to docs/app/debug/lib/versions/types.tsdiff --git a/docs/app/paste/page.tsx b/docs/app/debug/page.tsxsimilarity index 92%rename from docs/app/paste/page.tsxrename to docs/app/debug/page.tsxindex 4f3d04483..998044a9a 100644--- a/docs/app/paste/page.tsx+++ b/docs/app/debug/page.tsx@@ -10,6 +10,6 @@ const Playground = dynamic(() => import("./components/Playground").then((m) => mloading: () => <div className={styles.loading}>Loading playground…</div>,});-export default function PastePage() {+export default function DebugPage() {return <Playground />;}diff --git a/docs/app/paste/paste.module.css b/docs/app/debug/paste.module.csssimilarity index 100%rename from docs/app/paste/paste.module.cssrename to docs/app/debug/paste.module.cssdiff --git a/docs/components/site-primary-nav.tsx b/docs/components/site-primary-nav.tsxindex 327bc8254..27d25eb2d 100644--- a/docs/components/site-primary-nav.tsx+++ b/docs/components/site-primary-nav.tsx@@ -108,9 +108,9 @@ export const PRIMARY_SITE_NAV_ITEMS: NavItem[] = [},},{- title: "Paste",+ title: "Debug",description: "Validate and stream OpenUI Lang.",- href: "/paste",+ href: "/debug",preview: {light: "/nav/paste-light.webp",dark: "/nav/paste-dark.webp",diff --git a/docs/content/docs/openui-lang/developer-tools.mdx b/docs/content/docs/openui-lang/developer-tools.mdxnew file mode 100644index 000000000..1110758cd--- /dev/null+++ b/docs/content/docs/openui-lang/developer-tools.mdx@@ -0,0 +1,69 @@+---+title: Developer Tools+description: Use Inspect and Debug in development to watch streams, catch errors, and try OpenUI Lang against your own components.+---++OpenUI Developer Tools sit on your running app in development. They do not change production behavior. Two trays share a floating button: **Inspect** shows what the runtime is doing, and **Debug** lets you try OpenUI Lang against the same library the user sees.++<img+ src="/images/api-reference/devtools.gif"+ alt="OpenUI DevTools drawer displaying captured events in an OpenUI app"+ className="w-full rounded-lg border"+/>++## Installation++Apps created with `@openuidev/cli` already mount the widget. If you use `@openuidev/react-lang`, it also auto-mounts in development — look for the Shiro button in the bottom-right corner.++To add it to an existing app, install the package as a dev dependency:++```bash tab="pnpm" tab-group="pkg"+pnpm add -D @openuidev/devtools+```++```bash tab="bun" tab-group="pkg"+bun add -d @openuidev/devtools+```++```bash tab="yarn" tab-group="pkg"+yarn add -D @openuidev/devtools+```++```bash tab="npm" tab-group="pkg"+npm install -D @openuidev/devtools+```++Then mount it once, anywhere in the tree. A manual instance replaces the auto-mounted one, so you can set the corner, theme, or other props:++```tsx+import { OpenUIDevtools } from "@openuidev/devtools";++export function App() {+ return (+ <>+ {/* your app */}+ <OpenUIDevtools position="bottom-right" theme="light" />+ </>+ );+}+```++The widget is omitted from production builds unless you pass `enabled`. See [`OpenUIDevtools` props](/docs/api-reference/devtools) for the full list.++## Inspect++Use Inspect when a stream misbehaves and you want the live record, not a guess from the console.++Each OpenUI Lang render publishes events as it streams and when it settles: the response text, parser issues, errors, and timing. Inspect lists those events in the app. Expand a stream to read the Lang, copy it, or open it in Debug.++The header settings control auto-open on error, an errors-only filter, and light or dark theme. Close the tray with the X or Escape; the page behind stays usable.++## Debug++Use Debug when you already have a response and want to see how _this app_ parses, validates, and renders it.++Expand a settled stream in Inspect and click **Debug**. The editor loads that response. Render uses the `createLibrary()` instance that produced the stream, including your components and CSS. `Query()` and `Mutation()` run against mocked tools so you can iterate without hitting a backend.++The other panels are for diagnosis: Validation groups parse errors, Tree and JSON show the parsed result, and Stream replays the editor chunk by chunk as if the model were still generating. Eject Debug into its own window when you need more space.++[Try Debug here](/debug).diff --git a/docs/content/docs/openui-lang/meta.json b/docs/content/docs/openui-lang/meta.jsonindex 955138847..c5677aa81 100644--- a/docs/content/docs/openui-lang/meta.json+++ b/docs/content/docs/openui-lang/meta.json@@ -18,12 +18,12 @@"incremental-editing","builtins","patterns",- "external:[Paste](/paste)","---Language Specification---","specification-v01","specification-v05","evolution-guide","---Advanced---",+ "developer-tools","benchmarks","troubleshooting","telemetry",diff --git a/docs/next.config.mjs b/docs/next.config.mjsindex 658ad90df..d0a80d129 100644--- a/docs/next.config.mjs+++ b/docs/next.config.mjs@@ -76,6 +76,12 @@ const config = {},// Nav rename: Playground -> Demos, Projects -> Lab. Keep the old// paths working for external links and search results.+ // Product rename: Paste → Debug. Keep the old path working.+ {+ source: "/paste",+ destination: "/debug",+ permanent: true,+ },{source: "/playground",destination: "/demos",diff --git a/docs/public/images/api-reference/devtools.gif b/docs/public/images/api-reference/devtools.gifindex 38948276a..2d1255fcd 100644Binary files a/docs/public/images/api-reference/devtools.gif and b/docs/public/images/api-reference/devtools.gif differdiff --git a/docs/tsconfig.json b/docs/tsconfig.jsonindex 95cfd3874..b4cc3cb66 100644--- a/docs/tsconfig.json+++ b/docs/tsconfig.json@@ -33,7 +33,7 @@".source/*"],"@paste/*": [- "./app/paste/*"+ "./app/debug/*"]},"plugins": [