feat(editor): expose exportFloorplanPdf and add structure+utility export scope - #636
Open
SomSamantray wants to merge 4 commits into
Open
feat(editor): expose exportFloorplanPdf and add structure+utility export scope#636SomSamantray wants to merge 4 commits into
SomSamantray wants to merge 4 commits into
Conversation
Add a third FloorplanExportScope value that includes structure and utility nodes (ducts, pipes, HVAC) without furniture, shared through a pure isFloorplanNodeInExportScope predicate used at both collection filter sites. Existing 'full' and 'structure' behavior is unchanged. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Re-export exportFloorplanPdf and the FloorplanExportScope type from @pascal-app/editor so hosts with their own export UI can trigger a floorplan PDF export without reaching into the settings panel. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
…t comment Per code review, add a consumer-side compile-time assertion in apps/editor that imports exportFloorplanPdf and FloorplanExportScope from the @pascal-app/editor package entry, so a broken re-export fails check-types instead of passing silently. Also drop the WHAT-narration doc comment on collectFloorplanGeometry (behavior-preserving). Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the two gaps from #619 that blocked host apps from shipping their own floorplan export UI:
exportFloorplanPdfis now exported from@pascal-app/editor, so hosts can trigger a PDF export directly instead of only through the built-in Settings panel.'routing'export scope includes structure and utility nodes (ducts, pipes, HVAC) while excluding furniture, for electrical/engineering sheets. The scope filter is shared through one pure predicate applied at both collection sites;'full'and'structure'behavior is unchanged.How to test
bun test packages/editor/src/lib/floorplan— 51 pass, including newisFloorplanNodeInExportScopecases for all scopes/categories.bun run --cwd apps/editor check-typesandbun run --cwd packages/editor check-types— pass, including a new consumer-side import assertion guarding the re-export.bun devwith no console errors.Screenshots / screen recording
Not applicable — library API change with no visual difference.
Checklist
bun devbun checkto verify)mainbranchRelated: #619
Note
Low Risk
Focused library API and export filtering change with tests; existing full/structure export paths are preserved via the same predicate semantics.
Overview
Exposes
exportFloorplanPdfandFloorplanExportScopefrom@pascal-app/editorso host apps can trigger PDF export without reaching into internal paths (addresses #619).Adds a
routingexport scope: structure plus utility nodes (ducts, pipes, HVAC), excluding furniture and other categories.fullandstructurebehavior is unchanged. Scope filtering is centralized inisFloorplanNodeInExportScopeand used at both floorplan geometry collection sites (level tree walk and linked-level nodes) instead of duplicated inline checks.Unit tests cover the predicate for all scopes and categories;
apps/editorgets a compile-time smoke test that the package entry still re-exports the API and includesroutingin the scope union. A residual review findings doc records follow-up issues (schedules ignoring scope, no in-tree UI for routing, etc.).Reviewed by Cursor Bugbot for commit 40a1543. Bugbot is set up for automated code reviews on this repo. Configure here.