Skip to content

feat: add editor state API and data resource selector examples#334

Open
M1r1k wants to merge 1 commit into
mainfrom
mesh-editor-state-api-source-code-ref
Open

feat: add editor state API and data resource selector examples#334
M1r1k wants to merge 1 commit into
mainfrom
mesh-editor-state-api-source-code-ref

Conversation

@M1r1k

@M1r1k M1r1k commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Backports mesh-playground reference changes from uniformdev/platform#14254 to the mesh-integration example app:

  • canvasEditorTools.tsx — Replaces the old canvas-editor-tools.tsx with a new example using the EditorStateApi to walk the composition/entry tree, inspect nodes, and update properties programmatically
  • canvasEditorToolsTranslation.tsx — Example translation tool that walks the entire tree, reads values in a source locale, and writes translated values to a target locale using editorState.exportTree(), enableLocale(), setCurrentLocale(), and updateNodeProperty()
  • dataResourceSelector.tsx — Custom data resource selection UI that replaces the default JSON tree viewer when binding dynamic tokens. Registered via dataResourceSelectorUrl on the data archetype
  • mesh-manifest.reference.json — Added dataResourceSelectorUrl to the default archetype, updated editor tool URLs to camelCase, registered the translation tool and a composition-only editor tool

Test plan

  • Install the mesh-integration example app locally and verify the canvasEditorTools location renders the tree walker
  • Verify the translation tool UI shows locale selectors and simulates translation
  • Verify the data resource selector renders top-level arrays and sets JSON pointers via setValue

Made with Cursor

Backport mesh-playground changes from uniformdev/platform#14254 to the
mesh-integration reference app:

- Replace canvas-editor-tools with canvasEditorTools using the new
  EditorStateApi to walk and update the composition/entry tree
- Add canvasEditorToolsTranslation example demonstrating machine
  translation across locales via the editor state API
- Add dataResourceSelector example showing custom data resource
  selection UI replacing the default JSON tree viewer
- Register dataResourceSelectorUrl on the default archetype and add
  new editor tools (translation tool, composition-only tool) to the
  manifest

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for context-edge canceled.

Name Link
🔨 Latest commit 73181b5
🔍 Latest deploy log https://app.netlify.com/projects/context-edge/deploys/6a21748117caa800086e06e7

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
context-edge-vercel Ready Ready Preview, Comment Jun 4, 2026 12:50pm
hello-world-nextjs-approuter Ready Ready Preview, Comment Jun 4, 2026 12:50pm
nextjs-hello-world-protected Ready Ready Preview, Comment Jun 4, 2026 12:50pm
svelte-demo Ready Ready Preview, Comment Jun 4, 2026 12:50pm
sveltekitunfrm Ready Ready Preview, Comment Jun 4, 2026 12:50pm
uniform-hello-world Ready Ready Preview, Comment Jun 4, 2026 12:50pm
uniform-mesh-team-ai-translation Ready Ready Preview, Comment Jun 4, 2026 12:50pm
uniform-smarting-demo-fr-webhooks Ready Ready Preview, Comment Jun 4, 2026 12:50pm
uniform-smarting-demo-webhooks Ready Ready Preview, Comment Jun 4, 2026 12:50pm

Request Review

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