Skip to content

feat(gtk): the Linux renderer, as the ./gtk entry point - #85

Merged
LeslieOA merged 1 commit into
developfrom
feat/gtk-renderer
Oct 4, 2026
Merged

LeslieOA merged 1 commit into
developfrom
feat/gtk-renderer

Conversation

@LeslieOA

@LeslieOA LeslieOA commented Oct 4, 2026

Copy link
Copy Markdown
Member

Summary

  • New ./gtk entry point (src/gtk/): the Cairo renderer and GTKX CanvasView that Workspace's Linux client used, moved here unchanged apart from imports, formatting and one prop.
  • colorScheme prop like the React Native CanvasView. Left out, it follows libadwaita's Adw.StyleManager, live (useCanvasColorScheme).
  • Colour presets move to src/core/colors.ts, shared by the Skia theme and the Cairo renderer (Linux had a copy).
  • package.json: exports for . and ./gtk, optional @gtkx/react and @gtkx/cairo peers, GTK keywords and description. The library's tsc excludes src/gtk, since GTKX bindings are generated in the consuming app.
  • README: a Linux section (usage, gestures, the fallback, what it doesn't draw yet, the peers, and how to point a linked checkout's peers at the app).

Verification

  • Here: tsc clean, jest 122 pass, eslint 0 errors (only the 5 warnings already on develop).
  • Through Workspace's Linux client (workspace#640's PR) on this branch: GTKX typecheck clean, 417 tests including four new colour-scheme tests, each mutation-checked (fallback ignored, prop ignored, read once rather than live), the full check gate, and headless screenshots in light and dark.

Refs: #84

🤖 Generated with Claude Code

Workspace's Linux client drew canvases with its own Cairo renderer, built on
this library's parser. It lives here now, consumed as
@workspace.sh/react-native-jsoncanvas/gtk, on the same core: the colour
presets move to core/colors.ts so Skia and Cairo read one table instead of a
copy. CanvasView takes a colorScheme as the React Native one does, and left
out, follows libadwaita's Adw.StyleManager live.

GTKX is an optional peer, so React Native installs don't fetch it, and the
library's own tsc leaves src/gtk out: the bindings are generated in the app,
which typechecks and tests this code, as table-gtk is.

Refs: #84

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeslieOA
LeslieOA merged commit 82521b6 into develop Oct 4, 2026
1 check passed
@LeslieOA
LeslieOA deleted the feat/gtk-renderer branch October 4, 2026 19:01
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.

1 participant