Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

editor: export the headless-composition surface (ToolManager, keyboard, camera, edit systems)#396

Open
buildaloyd wants to merge 1 commit into
pascalorg:main from
buildaloyd:feat/headless-composition-exports
Open

editor: export the headless-composition surface (ToolManager, keyboard, camera, edit systems) #396
buildaloyd wants to merge 1 commit into
pascalorg:main from
buildaloyd:feat/headless-composition-exports

Conversation

@buildaloyd

@buildaloyd buildaloyd commented Jun 10, 2026

Copy link
Copy Markdown

What does this PR do?

Exports the thin editor-side glue that lets embedders compose <Viewer> + the interaction layer directly, without mounting the full <Editor> chrome — the registry already owns the per-kind tools (def.tool / def.affordanceTools / def.floorplanAffordances); these exports are the router and hosts around it:

  • ToolManager — the tool router (registry-driven + legacy fallbacks)
  • useKeyboard — the global shortcut hook (alongside the already-public markToolCancelConsumed)
  • CustomCameraControls — orbit/pan/first-person camera glue
  • getRegistryAffordanceTool — the def.affordanceTools dispatcher
  • BoxSelectTool — screen-space marquee selection
  • CeilingSystem, CeilingSelectionAffordanceSystem, RoofEditSystem, StairEditSystem, ZoneSystem — edit-affordance systems
  • Phase type (joins the already-exported Tool type from store/use-editor)

Additive only — no behavior change, no signature change, no file moves. Follows the same embedder story as layoutVersion, the v2 slot props, and the recent Phase 5 Stage D/E export waves: we build a custom shell on @pascal-app/editor and currently must choose between mounting all of <Editor>'s chrome or forking these files; with these exports we can compose Viewer + ToolManager + CustomCameraControls + useKeyboard (+ systems) and own the chrome while every kind-owned tool keeps working untouched.

How to test

  1. bun install && bun run build (or turbo run build --filter='@pascal-app/*') — builds green.
  2. cd packages/editor && bun run check-types — clean (verified locally).
  3. bunx biome check packages/editor/src/index.tsx — clean (verified locally).
  4. Consumer smoke (optional): in any app depending on @pascal-app/editor, import { ToolManager, useKeyboard, CustomCameraControls, Phase } from '@pascal-app/editor' resolves and <Viewer><ToolManager/><CustomCameraControls/></Viewer> mounts the registry tools.

Screenshots / screen recording

N/A — non-visual change (barrel exports only).

Checklist

  • I've tested this locally with bun dev (verified via package typecheck + workspace build instead; no app run)
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /