Perchance Builder — a no-code drag-and-drop generator builder - #1
Draft
Equallogic wants to merge 13 commits into
Draft
Perchance Builder — a no-code drag-and-drop generator builder#1Equallogic wants to merge 13 commits into
Equallogic wants to merge 13 commits into
Conversation
Removes the entire gstack working tree to start fresh. A full restorable archive (including .git history) was captured before clearing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Project config, build tooling, and the static sandboxed preview iframe document. Establishes the app shell foundation for the Perchance builder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
The canonical GeneratorProject JSON model is the single source of truth. The engine tree-walks it to produce live-preview output (seeded RNG, weighted picks, references, method chains, inline lists, expressions); the serializer emits the two Perchance panels with strict 2-space indentation. Round trip is pinned by golden-file and seeded engine tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Two-pane builder (editable lists with weights + output blocks) backed by a Zustand store, a sandboxed-iframe live preview with re-roll wired over postMessage, and an export panel with copyable Perchance source and a guided handoff to perchance.org/editgen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
A component palette (dnd-kit) drops List/Output/Text/Button/Input/Dropdown onto the canvas zones; list items and output blocks reorder by dragging. Three-column layout: palette, canvas, live preview. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
…tion Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
[name] now falls back to variable scope (fed by inputs) when no list of that name exists, mirroring Perchance. Enables the input -> variable -> output live loop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Select a block to edit its properties: outputRef list + DOM id, button label + re-roll targets, input/select/checkbox variable bindings, select options, and HTML tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Selecting from a list with a $output template now binds the chosen item's properties as this.* and renders the template (character-style generators). Adds tests for object-lists, conditionals, and the raw-expression hatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
New palette section adds text-to-image-plugin and ai-text-plugin blocks; dropping one wires the import and a plugin call. The Inspector edits the prompt; the preview shows a labeled placeholder shim (real plugins run on Perchance after export). Serializer emits the import and call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Projects auto-save to localStorage and reload on return. The export panel now shows validation warnings, a URL slug field, copy-both, and downloads (.txt of both panels, plus a .json project save). Header gains a New action. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcdEXhKZoXoBtd8pa5RsE3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 this is
A brand-new standalone product built in this workspace: a no-code, drag-and-drop builder for Perchance generators. You assemble a generator by dragging components onto a canvas and editing lists, watch it run in a live sandboxed preview, then export ready-to-paste Perchance source.
MVP complete — all six build phases landed
$output, raw-expr escape hatchArchitecture
One canonical JSON model (
GeneratorProject) is the single source of truth. Both the live-preview engine and the source serializer are pure functions of it — so there's no Perchance-text parser, and the riskiest question ("does exported code run when pasted into perchance.org?") was de-risked first, in isolation.src/engine) — deterministic tree-walk evaluator: seeded RNG, weighted picks, references, method chains, inline lists, expressions, object-list$output.src/serializer) — emits the two Perchance panels with strict 2-space indentation. Golden-file tested byte-for-byte.src/preview) — engine output rendered into asandbox="allow-scripts"iframe (no same-origin), bridged overpostMessagewith source-authenticated messages.src/builder,src/store,src/catalog) — dnd-kit palette/canvas on a Zustand store, with an Inspector for block config.src/export) — validation, copyable source, downloads, guided handoff toperchance.org/editgen.Research findings baked into the design
perchance-apifamily is read-only (pulls output from published gens), so the finish path is export + guided handoff, with auto-publish deferred.Verification
tsctypecheck and production build.Follow-ups (not in this MVP)
🤖 Generated with Claude Code