Skip to content

exportFloorplanPdf host API can't deliver its own contract: drawingType pinned #633

Description

@SomSamantray

Problem

The re-export makes exportFloorplanPdf a public host API, but drawingType is read from a store typed Extract<ConstructionDrawingType,'floor-plan'> with no setter. resolveNodeForDrawingType then drops construction-dimension nodes for any non-floor-plan drawing, while the exported PDF filename advertises that drawing type. Pre-existing internally; newly exposed as a public contract by the re-export.

Suggested fix

Add a drawingType parameter to exportFloorplanPdf (defaulting to the current store value) and stop advertising drawing-type names in filenames for drawings the export cannot perform, or lift the store pin.

Evidence

packages/editor/src/index.tsx:362-365 -- export { exportFloorplanPdf, type FloorplanExportScope } from './lib/floorplan/floorplan-export'

Source

Branch feat/floorplan-export-routing-scope (head f2d3051) — planned PR for #619.

Metadata

Severity: P3 | Confidence: 75 | Reviewer(s): adversarial | Finding ID: index-tsx-362-drawingtype-pin

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions