Block

Editor Workspace.

Lantern's Creator Studio: a file tree, a code frame and the AI panel side by side, with Validate, Download and Publish in the header. The columns stack on phones. Applying the AI result writes it into app.lua.

Installation#

$npx lanterncn add editor-workspace

This copies the file into components/editor-workspace and installs every component it uses. With the shadcn CLI: npx shadcn@latest add httptim/lantern-ui/editor-workspace.

Usage#

Render it from any page.

import EditorWorkspace from "@/components/editor-workspace/editor-workspace";

export default function Page() {
  return <EditorWorkspace />;
}

The AI side comes from the AI Panel block, which installs alongside it; this file imports ../ai-panel/panel and ../ai-panel/mock. Swap useMockAiRun for your own request code.

The code frame shows static text. Mount your editor inside CodeFrameBody (leave out its code prop) to make the files editable. From 1024px the three columns sit side by side and fill the viewport; below that they stack and the page scrolls.