Commit Graph
295 Commits
Author SHA1 Message Date
Sudhir YadavandGitHub 57df224948 feat: Add catalog-based material presets across structural nodes (#231)
* Add catalog-based material presets across structural nodes

* Fix material picker fallback and wall visible highlights

* Preserve wall materials in selection highlights
2026-04-15 12:16:35 -04:00
a205e4f778 Feat/stairs fence update (#226)
* feat: railing on the straight stairs and new fence

* feat: added spiral and curved stairs with bug fix for fence

* feat:fence are linked to each other ... so moving one move the other sharing the same coordinate

* fix: update stair railing logic to include front-side attachments for terminal landings

* Integrate fence rendering into the fence system

* fix: pass nodeId instead of undefined node to WallTreeNode and FenceTreeNode

TreeNode was passing `node` (undefined variable) instead of `nodeId` to
WallTreeNode and FenceTreeNode, causing a runtime ReferenceError.
Updated FenceTreeNode to accept nodeId and look up the node from the
scene store internally, consistent with all other tree node components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: update fence icon with new isometric design

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Aymeric Rabot <aymeric@pascal.app>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 23:31:57 -04:00
PascalandGitHub 50eca057ca feat: editor layout redesign v2 + 3D box select (#207)
Major layout redesign introducing v2 editor layout:

**New Features**
- V2 two-column layout (resizable sidebar + viewer panel with toolbar slots)
- 3D box select tool with marquee selection (561 lines pure Three.js geometry)
- View mode system (3D/2D/Split) replacing old floorplan toggle
- Floating level selector on viewer panel
- Viewer toolbar: level mode, wall mode, units, theme, camera, walkthrough, preview
- Horizontal tab bar for sidebar panels

**Layout Changes**
- Fixed 5-button control bar: Select, Box Select, Site Edit, Build, Delete
- Simplified view toggles (scans/guides only)
- Always-mounted viewers (display:none) to preserve WebGL context
- First-person walkthrough forces 3D view, restores on exit
- Site edit as permanent control (phase='site' is sole signal)

**Technical**
- layoutVersion prop: 'v1' (default) or 'v2'
- New exports: FloatingLevelSelector, SettingsPanel, SidebarTab, ViewMode, ViewerToolbarLeft/Right
- isCollapsed/setIsCollapsed added to sidebar store
- isFirstPersonMode restored for walkthrough support

19 files changed, +3230/-1898
Built and verified: bun run build passes (all tasks, 0 errors)
2026-04-02 11:24:19 -04:00
f06f2fa1b1 feat: 2D editing — floorplan panel, measurements, command palette (v0.3.0)
* sync: port 2D editing features from monorepo (v0.3.0)

## New Features

### Floorplan Panel (7.5K LOC)
- Full 2D editing interface with wall drawing, measurement, and unit display
- Interactive floorplan view with pan/zoom, grid snapping
- Wall thickness visualization, door/window placement
- Zone and slab polygon editing
- Guide image overlay support
- Metric/imperial unit toggle

### Command Palette Overhaul
- Complete rewrite with new command registry system
- Keyboard shortcuts UI with ShortcutToken component
- Editor-specific commands (floorplan, measurements, camera focus)
- Improved search and action organization

### Wall Measurements
- Real-time wall length labels in 3D view
- Metric/imperial conversion
- Wall measurement UI component

### Enhanced Tools
- Wall drafting utilities (grid snapping, validation)
- Node action menu for quick operations
- Improved polygon editing for zones/slabs/sites
- Roof segment panel for granular roof control

## Package Changes

### @pascal-app/core@0.3.0
- New wall-footprint.ts: 2D wall footprint calculation
- Wall mitering exports for floorplan view
- camera-controls:focus event
- Space detection undo pause/resume
- Mark sibling nodes dirty on deletion (miter recalc)

### @pascal-app/viewer@0.3.0
- ErrorBoundary component for robust item rendering
- Broken item fallback UI
- Wall renderer: mark dirty on mount
- Ground occluder: only lowest level punches through
- Unit state (metric/imperial) in viewer store

### @pascal-app/editor@0.1.0
- 48 file changes (16 new, 32 modified)
- New stores: useCommandRegistry, usePaletteViewRegistry
- Tree node drag-and-drop system
- Level selection utilities
- Enhanced scene graph operations

## Apps/Editor
- GeistPixelSquare font for pixel-perfect UI
- Blueprint icon asset
- Updated layout and globals for font support

## Security
- Zero AI imports or internal package refs
- All monorepo-specific code excluded
- Clean audit: no API keys or secrets

## Testing
- Security audit passed 
- All AI/internal code excluded 
- Version bumps applied 

79 files modified, 16 files added
~2600 insertions, ~1400 deletions

* fix: lint cleanup — suppress intentional dep warnings, fix missing dep, remove stale ignores

- Add biome-ignore for 3 intentional useEffect reset patterns (levelId, selectedGuide, selectedId)
- Fix actual missing dependency: currentBuildingId in handleSiteEditShortcutSelect callback
- Remove 3 stale biome-ignore comments in r3f.d.ts (rule not active)

Build and lint pass clean.

* fix: type errors — polygon area guards, selection cast, readonly keywords, door guard

- ceiling-panel, slab-panel, ceiling-tree-node, slab-tree-node, zone-tree-node:
  guard polygon[i]/polygon[j] array access before arithmetic (TS2532)
- scene.ts: introduce toViewerSelection() helper to cast persisted string IDs
  to branded template literal types expected by useViewer.setSelection (TS2345)
- door-panel: guard early return when node is undefined in setSegmentHeightRatio (TS18048)
- editor-commands: remove 'as const' from inline command object, keywords is mutable string[] (TS2322)

All type checks pass. Build and lint clean.

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-03-24 19:48:11 +00:00
wass08 f2501be2bf remove community 2026-03-13 09:07:46 +01:00
wass08 3eeba322a8 rename before moving to monorepo 2026-03-11 15:12:41 +01:00
wass08 5bd9c21dbc split community from editor 2026-03-11 13:29:25 +01:00
wass08 3df8a006f2 clean impl 2026-03-11 13:08:33 +01:00
wass08 a97ed42578 presets community / non community 2026-03-11 13:02:17 +01:00
wass08 7359c1fcbf splitting editor and community 2026-03-11 12:16:26 +01:00
wass08 32406e5a20 enhance hover zone 2026-03-11 07:47:10 +01:00
wass08 30b9e3ccb2 move zones to separate layers todo: fix hardcoded 2 and zone floor 2026-03-11 07:47:10 +01:00
wass08 551f38fea3 fix build 2026-03-10 18:22:28 +01:00
wass08 d0f2a1a06f actions command K 2026-03-10 13:35:05 +01:00
wass08 175040232a theme switch minimalist 2026-03-10 12:25:30 +01:00
wass08 52bc82d6e1 project switch 2026-03-10 12:13:04 +01:00
wass08 433eaa2e02 project edit name change 2026-03-10 10:56:09 +01:00
Aymeric RabotandClaude Opus 4.6 d3e17cac04 Add editor preview mode for in-place viewer experience
Adds a Preview button next to Radio Pascal that switches the editor
into a viewer-like experience without leaving the page. The preview
mode swaps in the viewer's selection manager (hierarchical drill-down),
zone system, camera controls (left-click pan, auto-navigate), and
interactive item system while hiding editor-only UI (tools, panels,
sidebar, grid). Back arrow in the viewer overlay returns to the editor.

Also widens the default sidebar from 288px to 432px for better
project title visibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:43:10 -05:00
Aymeric RabotandClaude Opus 4.6 de6bfd8c00 Add react-scan and react-grab dev tools (development only)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 18:52:01 -05:00
wass08 8d26a4d81c fix issue when switching phase/structure layer 2026-03-06 13:09:25 +01:00
wass08 ca0a3acf17 fixed local thumbnails 2026-03-06 13:09:25 +01:00
wass08 5143d3f0e5 adding new items 2026-03-06 13:09:25 +01:00
wass08 7e6684bbc8 zone label edition 2026-03-06 13:09:23 +01:00
wass08 849baa0a0e default value 2026-03-06 13:08:24 +01:00
wass08 88d0231a95 collection controls 2026-03-06 13:08:24 +01:00
wass08 bc57afb8fa collections + unify color picker 2026-03-06 13:08:23 +01:00
wass08 8f65daa853 handling lights 2026-03-06 13:08:23 +01:00
wass08 e2de931aa7 adjust fan anim 2026-03-06 13:08:23 +01:00
wass08 54051b11fa item system controls 2026-03-06 13:08:21 +01:00
wass08 927ecba054 schema and interactive store 2026-03-06 13:06:33 +01:00
Wassim SAMADandGitHub e0d97df8c8 Revert "Restore inline zone label editing on canvas (#134)"
This reverts commit 036344d705.
2026-03-06 13:04:52 +01:00
Aymeric RabotandGitHub 036344d705 Restore inline zone label editing on canvas (#134)
* fix: harden viewer/editor renderer init and error handling

* Bump @biomejs/biome and turbo versions

Update devDependencies: bump @biomejs/biome from ^2.4.4 to ^2.4.6 and turbo from ^2.8.12 to ^2.8.13. Regenerated bun.lock to reflect the updated resolved package versions.

* Restore inline zone label editing on canvas
2026-03-05 16:45:32 -05:00
Aymeric RabotandGitHub fb2c7c6c71 fix: harden viewer/editor renderer init and error handling (#133) 2026-03-05 15:42:58 -05:00
wass08 299cbdb0b3 fix build 2026-03-04 16:29:55 +01:00
wass08 47747495e5 polish listing 2026-03-04 15:46:18 +01:00
wass08 799cf2f56c remove issue esc key 2026-03-04 15:28:12 +01:00
wass08 25908ecfc6 square shape 2026-03-04 15:20:43 +01:00
wass08 d79d54c4d8 evader for preset 2026-03-04 15:17:01 +01:00
wass08 23ed54cb6a thumbnail generation 2026-03-04 15:13:07 +01:00
wass08 ba2dfa8caa presets community 2026-03-04 13:38:51 +01:00
wass08 a86609aa5c community presets draft 2026-03-04 13:18:18 +01:00
wass08 5e0c64b760 remove position hack for zone + fade-in-out anims 2026-03-04 11:22:01 +01:00
bee4613b82 Add project versioning & publish flow (#130)
* Add project versioning & publish flow

Introduce project model versioning and publishing support.

- DB: add published_model_version column to projects (migration + schema + types).
- Models: add version status types and helpers, implement getProjectVersionStatus, enhanced getProjectModel to load draft/published/legacy fallbacks, saveProjectModel now manages draft creation/updating and avoids no-op saves, saveProjectVersion to lock/save/publish versions and create next draft, publishProjectModel to republish specific saved versions. Includes scene-graph equality checks and authenticated project ownership checks.
- UI: AppSidebar shows publish/draft status, polling refresh, and Save / Save & publish / Publish actions that flush the editor scene before version operations. Hook update: load scene from result.data.model.scene_graph.
- Public project loader: prefer published version with legacy fallbacks.

This enables safe draft editing, explicit saves, publishing, and keeps autosave working across version locks.

* Add project versioning UI, APIs & preview mode

Introduce full version management support: UI, backend actions, and editor integration.

- UI: Add a Versions popover to the app sidebar with search, relative timestamps, preview, restore and publish controls; disable version actions while previewing and show proper labels/states. Imported new icons, popover and tooltip primitives and added formatRelativeTime helper.
- Actions: Add ProjectVersionListItem type and APIs getProjectVersionList and getProjectVersionByNumber to list and fetch saved (non-draft) versions.
- Hooks: Extract applySceneGraphToEditor and sync editor selection logic; ensure scene loading applies selection and supports preview mode (which suppresses autosave).
- Store: Add isVersionPreviewMode to project store with setter and isSceneLoading flag usage to prevent autosave while previewing.
- Misc: Wire up version list loading, previewing, restoring and publishing flows, and refresh version status/list after actions.

These changes enable browsing historical project versions, previewing them without triggering autosaves, and restoring or publishing selected versions.

* Improve version preview, restore flow & draft handling

- Add scene graph snapshot to preserve unsaved work during preview
- Include draft versions and metadata in version list
- Add getProjectVersionById for direct ID-based lookups
- Add autosave status to project store
- Refactor sidebar version UI (remove search, use save icon)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 23:56:46 -05:00
Aymeric Rabot 0edbc65e8d Update polygon-editor.tsx 2026-03-03 16:22:08 -05:00
Aymeric RabotandClaude Opus 4.6 48979ec014 fix raycaster layers, polygon drag, slider undo, and grid events
- Enable EDITOR_LAYER on R3F raycaster for proper hit detection
- Fix polygon editor drag using refs and direct position passing
- Handle pointercancel events and fix pointerId access in polygon editor
- Fix slider undo by reverting to start value before resuming temporal state
- Allow grid:move during camera drag so polygon editor works while panning
- Bump better-auth to ^1.5.2 and turbo to ^2.8.12
- Remove explicit return type on createAuth for better inference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:41:19 -05:00
wass08 267fd3960e hide guides and scans before thumbnails 2026-03-02 10:14:36 +09:00
wass08 85232d6b0d hide tools from thumbnail 2026-03-02 10:10:58 +09:00
wass08 0f271985d8 take only building layers to the thumbnail 2026-03-02 10:01:22 +09:00
wass08 8e097537d0 fix duplicate door 2026-03-02 09:09:31 +09:00
wass08 f17e0cb955 fix dot color 2026-03-02 08:53:34 +09:00