Go to file
echo 49b383db2e Phase 1-2: Panel editor with pen/eraser/shape tools, undo/redo, zoom/pan, color picker
- gui/panel_editor.odin: Full drawing editor overlay
  - Editor_Tool enum: Pen, Eraser, Line, Rect, Circle, Fill
  - Brush_Stroke struct with points array for freehand/shape strokes
  - Panel_Editor_State with active panel, strokes, undo snapshots, zoom/pan
  - open/close/commit lifecycle: loads panel texture, composites on commit
  - Screen-to-canvas coordinate mapping with zoom and pan offsets
  - Stroke rendering: freehand via line segments, shapes via endpoints
  - Undo via snapshot replay (cap 30 snapshots)
  - Toolbar: tool buttons, brush size slider, color picker, commit/cancel
  - Color picker panel: 18 preset color swatches, current color display
  - to_cstr helper for Odin string->cstring conversion

- gui/runtime.odin: Editor integration
  - GUI_App_State.editor field (Panel_Editor_State)
  - Editor update/render calls in main loop when active
  - Escape key closes editor, Ctrl+Z for undo
  - editor_close in defer chain for cleanup on exit
  - btn_panel_draw click handler opens editor on selected panel

- gui/workspaces.odin: Draw button on panel cards
  - 'Draw' button triggers btn_panel_draw action

- gui/chrome.odin: Editor hint text when editor active
  - Shows 'Press Escape to close editor' overlay

Build passes. 153/156 tests pass (3 pre-existing CLI/TUI failures,
2 new env-related failures due to FAL_API_KEY in .env).
2026-05-28 15:39:42 +02:00
.github/workflows check point 2026-05-24 12:41:31 +02:00
odin Phase 1-2: Panel editor with pen/eraser/shape tools, undo/redo, zoom/pan, color picker 2026-05-28 15:39:42 +02:00
public init state 2026-05-18 19:58:01 +02:00
src init state 2026-05-18 19:58:01 +02:00
.env.example init state 2026-05-18 19:58:01 +02:00
.gitignore init state 2026-05-18 19:58:01 +02:00
.gitmodules check point 2026-05-24 12:41:31 +02:00
AGENTS.md current state 2026-05-28 15:20:02 +02:00
app current state 2026-05-28 15:20:02 +02:00
eslint.config.js init state 2026-05-18 19:58:01 +02:00
index.html init state 2026-05-18 19:58:01 +02:00
package-lock.json check point 2026-05-21 06:10:32 +02:00
package.json init state 2026-05-18 19:58:01 +02:00
postcss.config.js init state 2026-05-18 19:58:01 +02:00
README.md init state 2026-05-18 19:58:01 +02:00
tailwind.config.js init state 2026-05-18 19:58:01 +02:00
tests current state 2026-05-28 15:20:02 +02:00
tsconfig.app.json init state 2026-05-18 19:58:01 +02:00
tsconfig.json init state 2026-05-18 19:58:01 +02:00
tsconfig.node.json init state 2026-05-18 19:58:01 +02:00
vite.config.ts init state 2026-05-18 19:58:01 +02:00
vitest.config.ts init state 2026-05-18 19:58:01 +02:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])