Skip to content

fix(editor): keep block values across pages, fit around panels, HTML blocks with CSS and JS variables - #16

Merged
yossdotpro merged 4 commits into
masterfrom
ccr-0c8ed66c-cdxgzl
Sep 29, 2026
Merged

yossdotpro merged 4 commits into
masterfrom
ccr-0c8ed66c-cdxgzl

Conversation

@yossdotpro

Copy link
Copy Markdown
Owner
  • Blocks start from their saved values instead of their defaults. Going to
    the block editor and back remounted every block with its defaults, which
    were written over the saved values (position, size, text, code) before
    being read back; anything reading the store then (autosave, the shared
    selection box) could keep them. It also made a new code block show raw
    <pre><code> markup for a frame, and a code block lost a custom
    background because its theme effect ran again on mount.
  • Content-sized blocks no longer store a 0 × 0 size while the canvas is
    hidden during navigation.
  • A text block exported while selected or hovered no longer carries its
    blue outline into the image.
  • Zoom to fit and Zoom to 100% fit and center the canvas in the space the
    floating toolbar and properties panel leave free (with Agent open the
    canvas ended up under the properties panel).
  • HTML block scripts can build elements: the scoped document called page
    methods on the proxy, so createElement threw and lists rendered from a
    JS array stayed empty. One shared createScopedDocument replaces the two
    copies. A // @var value followed by a semicolon now parses.
  • Agent and MCP: every HTML block has html, css and js, with annotated
    :root variables and // @var JS variables (html-contract.ts).
    add_block, update_block and update_html_block refuse other code with what
    to fix (also a redeclared variable or a list that is not a JSON list of
    strings) and turn allow-scripts on. The guide, prompts, catalog and docs
    say so.
  • Property panel of HTML blocks: readable variable names in aligned rows,
    numbers with a typed value, lists edited item by item (reorder, remove,
    add; numbers no longer break editing), objects edited in place or as
    JSON, and a compact shadow editor.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PQYEWDFg3DVAHPn4MuxJQS

…blocks with CSS and JS variables

- Blocks start from their saved values instead of their defaults. Going to
  the block editor and back remounted every block with its defaults, which
  were written over the saved values (position, size, text, code) before
  being read back; anything reading the store then (autosave, the shared
  selection box) could keep them. It also made a new code block show raw
  `<pre><code>` markup for a frame, and a code block lost a custom
  background because its theme effect ran again on mount.
- Content-sized blocks no longer store a 0 × 0 size while the canvas is
  hidden during navigation.
- A text block exported while selected or hovered no longer carries its
  blue outline into the image.
- Zoom to fit and Zoom to 100% fit and center the canvas in the space the
  floating toolbar and properties panel leave free (with Agent open the
  canvas ended up under the properties panel).
- HTML block scripts can build elements: the scoped `document` called page
  methods on the proxy, so `createElement` threw and lists rendered from a
  JS array stayed empty. One shared `createScopedDocument` replaces the two
  copies. A `// @var` value followed by a semicolon now parses.
- Agent and MCP: every HTML block has html, css and js, with annotated
  `:root` variables and `// @var` JS variables (html-contract.ts).
  add_block, update_block and update_html_block refuse other code with what
  to fix (also a redeclared variable or a list that is not a JSON list of
  strings) and turn allow-scripts on. The guide, prompts, catalog and docs
  say so.
- Property panel of HTML blocks: readable variable names in aligned rows,
  numbers with a typed value, lists edited item by item (reorder, remove,
  add; numbers no longer break editing), objects edited in place or as
  JSON, and a compact shadow editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQYEWDFg3DVAHPn4MuxJQS
… panel scrolls to its end

- The properties panel could not scroll to its end: each tab's scroll area
  took the full height of the panel below its title (and the align bar of
  the Control tab), so the last ~100 px stayed hidden. Tabs are now a
  TabPage whose scroll area takes only the height left.
- Project variables leave the Workspace tab for their own Variables tab.
- The brand kit editor is one component (BrandKitEditor) shown in a new
  Brand kit tab; File → Brand kit… opens that tab in the editor and the
  dialog elsewhere. ui-store's selectedTab now switches to any panel tab.
- Agent and MCP clients write the brand kit: update_brand_kit (name,
  palette, fonts by role checked against Google Fonts, logo names and
  uses, guidelines) and save_brand_logo (SVG markup cleaned of scripts, a
  data URL or an image block). The guide and prompts ask for it only when
  the user gives their brand or asks for a kit.
- CHANGELOG: v2.0.0 is out, so the changes since then move to Unreleased.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQYEWDFg3DVAHPn4MuxJQS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQYEWDFg3DVAHPn4MuxJQS
…space settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQYEWDFg3DVAHPn4MuxJQS
@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
karbonized Ready Ready Preview Sep 29, 2026 3:01pm UTC

@yossdotpro
yossdotpro merged commit 75d22d9 into master Sep 29, 2026
3 checks passed
@yossdotpro
yossdotpro deleted the ccr-0c8ed66c-cdxgzl branch September 29, 2026 15:02

This branch was successfully deployed

1 active deployment
Preview — 276f30ec Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants