Add canvas support to pyide#1123
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@copilot add an example to the website for element pyide. |
- Add unProxy() helper to convert Pyodide PyProxy objects to JavaScript objects - Update js_graphic_size() to unproxy specs parameter - Update js_render_graphic() to unproxy specs parameter - Fixes issue where Pytamaro graphic specs weren't being processed correctly This implementation is based on the reference implementation pattern used in other Pytamaro-Pyodide integrations, which properly handles PyProxy objects returned from Python code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add error logging to unProxy() helper for debugging - Wrap FFI functions in try-catch blocks with console.error logging - Fix incomplete catch block in js_render_graphic - Improves debugging when Pytamaro rendering fails This helps identify issues when PyProxy object conversion or graphic rendering fails, making it easier to diagnose Pytamaro integration problems. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Parse @@@PYTAMARO_DATA_URI_BEGIN/END@@@ markers in stdout and render
as <img> elements instead of plain text
- Fix dict_converter: Object.fromEntries in unProxy() so Python dicts
are converted to plain JS objects (not Maps), allowing buildGraphic()
to access spec.t, spec.width, spec.color etc. correctly
- Remove incorrect {canvas} attribute from pytamaro pyide examples
(pytamaro renders via stdout/output tab, not the pygame canvas tab)
- Fix heading typo Pytamato -> Pytamaro in English docs
- Add missing Pytamaro section to German docs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openpatch/hyperbook/sessions/0a769325-9e37-4cda-9af6-8de912aa18b1 Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
|
@copilot after an exception I can not type in the code editor |
Agent-Logs-Url: https://github.com/openpatch/hyperbook/sessions/7b979d9e-a3b8-426d-a621-581569236bde Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Fixed in cdbb0b7. The previous fix inadvertently called |
|
@copilot I was talking about an exception in python: Loading pygame-ce For this code: import pygame async def run_game(): asyncio.run(run_game()) this happens in pyide.md |
…teners Agent-Logs-Url: https://github.com/openpatch/hyperbook/sessions/04e1f523-6e97-425e-ba08-dfbe95041e8c Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openpatch/hyperbook/sessions/04e1f523-6e97-425e-ba08-dfbe95041e8c Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Fixed in 092751e (cleaned up in 3904fd3). When a Python/pygame-ce exception occurs, |
…patch/hyperbook into copilot/add-canvas-support-to-pyide
- All IDE directives (pyide, typst, webide, p5, onlineide, sqlide) now take the full viewport height (calc(100dvh - 80px)) on all screen sizes, not just wide screens - Add height attribute support to pyide, typst, webide, p5 via CSS custom property (--X-height) on the root element - onlineide and sqlide default height changed from 600px to calc(100dvh - 80px); height attribute sets CSS variable on root - Inner panels use flex: 1 1 0 to share the root height proportionally in column (small-screen) layout - Redundant height declarations in media queries removed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.