@snaptrude/plugin-core 0.0.0-bimsvg-20260928124803
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +231 -0
- package/CHANGELOG.md +341 -0
- package/CLAUDE.md +11 -0
- package/api-manifest.json +9120 -0
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +658 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +59 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +261 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +333 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +1073 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +78 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +33 -0
- package/dist/api/core/geom/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +514 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +97 -0
- package/dist/api/core/index.d.ts.map +1 -0
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +455 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +40 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +341 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +805 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/index.d.ts +18 -0
- package/dist/api/core/math/index.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +170 -0
- package/dist/api/core/math/quat.d.ts.map +1 -0
- package/dist/api/core/math/vec3.d.ts +174 -0
- package/dist/api/core/math/vec3.d.ts.map +1 -0
- package/dist/api/core/mode/index.d.ts +111 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/project/index.d.ts +466 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/proposals/index.d.ts +531 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +265 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +860 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +49 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +185 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +1747 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/create/opening-fields.d.ts +37 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +70 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +470 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/family.d.ts +611 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +296 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +260 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +67 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +551 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +252 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1318 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +394 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +282 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +249 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +803 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/visibility.d.ts +126 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +300 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +265 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +1 -0
- package/dist/api/entity/department.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +28 -0
- package/dist/api/entity/index.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +210 -0
- package/dist/api/entity/referenceLine.d.ts.map +1 -0
- package/dist/api/entity/space.d.ts +846 -0
- package/dist/api/entity/space.d.ts.map +1 -0
- package/dist/api/entity/story.d.ts +476 -0
- package/dist/api/entity/story.d.ts.map +1 -0
- package/dist/api/index.d.ts +45 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/presentation/aiInspiration.d.ts +2400 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/annotate.d.ts +483 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +184 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +2900 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +126 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +164 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +114 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/placedViews.d.ts +1232 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +643 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +70 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +741 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +450 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +78 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +487 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +71 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +398 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +823 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2628 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/api/workspace/index.d.ts +552 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/handles.d.ts +229 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +47 -0
- package/dist/host-utils.d.ts.map +1 -0
- package/dist/index.cjs +8836 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7568 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +41 -0
- package/scripts/generate-manifest.mjs +238 -0
- package/scripts/generate-manifest.test.mjs +292 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +683 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +61 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/camera/index.ts +268 -0
- package/src/api/core/comment/index.ts +376 -0
- package/src/api/core/geom/create/index.ts +1204 -0
- package/src/api/core/geom/delete/index.ts +84 -0
- package/src/api/core/geom/index.ts +35 -0
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +563 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +99 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +504 -0
- package/src/api/core/io/index.ts +42 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +360 -0
- package/src/api/core/io/underlay/index.ts +705 -0
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/index.ts +20 -0
- package/src/api/core/math/quat.ts +172 -0
- package/src/api/core/math/vec3.ts +179 -0
- package/src/api/core/mode/index.ts +108 -0
- package/src/api/core/project/index.ts +479 -0
- package/src/api/core/proposals/index.ts +569 -0
- package/src/api/core/storeys/index.ts +294 -0
- package/src/api/core/tags.ts +911 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +51 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/bulk-items.ts +186 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +1954 -0
- package/src/api/design/create/opening-fields.ts +37 -0
- package/src/api/design/delete/index.ts +74 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +500 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/family.ts +646 -0
- package/src/api/design/furniture/index.ts +319 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +274 -0
- package/src/api/design/lock.ts +69 -0
- package/src/api/design/materials/index.ts +608 -0
- package/src/api/design/query/geometry/index.ts +288 -0
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +1176 -0
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +275 -0
- package/src/api/design/selection/index.ts +273 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +254 -0
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +798 -0
- package/src/api/design/visibility.ts +143 -0
- package/src/api/design/windows/index.ts +333 -0
- package/src/api/entity/buildableEnvelope.ts +322 -0
- package/src/api/entity/department.ts +0 -0
- package/src/api/entity/index.ts +30 -0
- package/src/api/entity/referenceLine.ts +235 -0
- package/src/api/entity/space.ts +612 -0
- package/src/api/entity/story.ts +517 -0
- package/src/api/index.ts +47 -0
- package/src/api/presentation/aiInspiration.ts +1116 -0
- package/src/api/presentation/annotate.ts +417 -0
- package/src/api/presentation/diagrams.ts +194 -0
- package/src/api/presentation/drawings.ts +529 -0
- package/src/api/presentation/export.ts +133 -0
- package/src/api/presentation/import.ts +159 -0
- package/src/api/presentation/index.ts +129 -0
- package/src/api/presentation/placedViews.ts +1203 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +616 -0
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/presentation/viewPresets.ts +83 -0
- package/src/api/presentation/views.ts +698 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +408 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +83 -0
- package/src/api/program/departments.ts +517 -0
- package/src/api/program/index.ts +73 -0
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/layout.ts +422 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +748 -0
- package/src/api/program/spreadsheet.ts +2698 -0
- package/src/api/workspace/index.ts +612 -0
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/handles.ts +282 -0
- package/src/host-utils.ts +68 -0
- package/src/index.ts +5 -0
- package/src/types.ts +16 -0
- package/test/errors.test.mjs +184 -0
- package/tsconfig.json +22 -0
- package/tsup.config.ts +12 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
import * as z from "zod"
|
|
2
|
+
import { PluginApiReturn } from "../../types"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Presentation sheets — the layout sheets a presentation is assembled on.
|
|
6
|
+
*
|
|
7
|
+
* A **sheet** is a page in Present mode that views and diagrams are placed onto.
|
|
8
|
+
* These methods require **Present mode to be open** (the documentation editor) —
|
|
9
|
+
* reads return `[]`/`null` and writes throw when it is not.
|
|
10
|
+
*
|
|
11
|
+
* `list`/`get` are reads; the rest mutate and require Present mode to be open:
|
|
12
|
+
* `create` adds a sheet, `place` drops a saved view onto a sheet as a live
|
|
13
|
+
* linked view shape, `rename` relabels a sheet, `delete` removes one, `reorder`
|
|
14
|
+
* moves one in the sheet order, `setActive` navigates to one, and
|
|
15
|
+
* `updatePlacedView` re-renders placed views to the current model.
|
|
16
|
+
*
|
|
17
|
+
* Accessed via `snaptrude.presentation.sheets`.
|
|
18
|
+
*/
|
|
19
|
+
export abstract class PluginPresentationSheetsApi {
|
|
20
|
+
constructor() {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* List the layout sheets in the presentation.
|
|
24
|
+
*
|
|
25
|
+
* @returns A {@linkcode PluginPresentationSheetsListResult} with a `sheets`
|
|
26
|
+
* array (empty when Present mode is closed or there are no sheets).
|
|
27
|
+
*
|
|
28
|
+
* @examplePrompt List all the sheets
|
|
29
|
+
* @examplePrompt How many layout sheets are there?
|
|
30
|
+
* @examplePrompt Show me the presentation sheets
|
|
31
|
+
* @examplePrompt What sheets can I place views on?
|
|
32
|
+
*
|
|
33
|
+
* # Example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const { sheets } = await snaptrude.presentation.sheets.list()
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
public abstract list(): PluginApiReturn<PluginPresentationSheetsListResult>
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get a single sheet by id.
|
|
42
|
+
*
|
|
43
|
+
* @param sheetId - The id of the sheet to read.
|
|
44
|
+
* @returns The matching {@linkcode PluginPresentationSheet}, or `null`.
|
|
45
|
+
*
|
|
46
|
+
* @examplePrompt Get the sheet with id sheet_1
|
|
47
|
+
* @examplePrompt Find the sheet called Cover
|
|
48
|
+
* @examplePrompt Look up a layout sheet by id
|
|
49
|
+
*
|
|
50
|
+
* # Example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const sheet = await snaptrude.presentation.sheets.get("sheet_1")
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
public abstract get(
|
|
56
|
+
sheetId: string,
|
|
57
|
+
): PluginApiReturn<PluginPresentationSheetsGetResult>
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a new layout sheet.
|
|
61
|
+
*
|
|
62
|
+
* Optionally sets the paper size and orientation — the same presets as the
|
|
63
|
+
* sheet header's size dropdown (ANSI A–E, Arch A–E1, ISO A4–A0). When `size`
|
|
64
|
+
* is omitted the sheet inherits the editor session's last-used size
|
|
65
|
+
* (initially ANSI B) in landscape, so pass `size` explicitly whenever the
|
|
66
|
+
* output format matters.
|
|
67
|
+
*
|
|
68
|
+
* Requires Present mode to be open.
|
|
69
|
+
*
|
|
70
|
+
* @param name - Display name for the new sheet (optional).
|
|
71
|
+
* @param options - Optional `size` ({@linkcode PluginSheetSize} paper preset)
|
|
72
|
+
* and `orientation` ({@linkcode PluginSheetOrientation}; `"landscape"` when
|
|
73
|
+
* omitted).
|
|
74
|
+
* @returns The newly created {@linkcode PluginPresentationSheet}.
|
|
75
|
+
* @throws If Present mode is not open.
|
|
76
|
+
*
|
|
77
|
+
* @examplePrompt Create a new sheet called Cover
|
|
78
|
+
* @examplePrompt Add an A3 landscape layout sheet
|
|
79
|
+
* @examplePrompt Make a new ANSI D presentation sheet named Floor Plans
|
|
80
|
+
* @examplePrompt Create a portrait A4 sheet
|
|
81
|
+
*
|
|
82
|
+
* # Example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const sheet = await snaptrude.presentation.sheets.create("Cover", {
|
|
85
|
+
* size: "ISO_A3",
|
|
86
|
+
* orientation: "landscape",
|
|
87
|
+
* })
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
public abstract create(
|
|
91
|
+
name?: string,
|
|
92
|
+
options?: { size?: PluginSheetSize; orientation?: PluginSheetOrientation },
|
|
93
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Set a sheet's paper size and/or orientation.
|
|
97
|
+
*
|
|
98
|
+
* Applies one of the standard paper presets — exactly what the sheet header's
|
|
99
|
+
* size dropdown and orientation toggle do. Content that no longer fits inside
|
|
100
|
+
* the resized sheet is moved out onto the canvas (matching the native
|
|
101
|
+
* behavior). Undoable. Does not change the user's remembered default size for
|
|
102
|
+
* new sheets.
|
|
103
|
+
*
|
|
104
|
+
* Requires Present mode to be open.
|
|
105
|
+
*
|
|
106
|
+
* @param sheetId - The id of the sheet to resize.
|
|
107
|
+
* @param size - The paper preset ({@linkcode PluginSheetSize}).
|
|
108
|
+
* @param orientation - Optional {@linkcode PluginSheetOrientation}; keeps the
|
|
109
|
+
* sheet's current orientation when omitted.
|
|
110
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
111
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
112
|
+
*
|
|
113
|
+
* @examplePrompt Resize sheet_1 to A1
|
|
114
|
+
* @examplePrompt Make the cover sheet ANSI B portrait
|
|
115
|
+
* @examplePrompt Change this sheet to Arch D landscape
|
|
116
|
+
* @examplePrompt Set the sheet size to A3
|
|
117
|
+
*
|
|
118
|
+
* # Example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const sheet = await snaptrude.presentation.sheets.setSize("sheet_1", "ISO_A1", "portrait")
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
public abstract setSize(
|
|
124
|
+
sheetId: string,
|
|
125
|
+
size: PluginSheetSize,
|
|
126
|
+
orientation?: PluginSheetOrientation,
|
|
127
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Set a sheet's print margin.
|
|
131
|
+
*
|
|
132
|
+
* Applies one of the canonical margin presets — exactly what the sheet
|
|
133
|
+
* header's margin dropdown does. `margin` is unit-agnostic: `0 | 0.25 |
|
|
134
|
+
* 0.5 | 0.75 | 1`, displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial
|
|
135
|
+
* projects and None / 5mm / 10mm / 15mm / 20mm on metric ones. One undo
|
|
136
|
+
* step. Requires Present mode to be open.
|
|
137
|
+
*
|
|
138
|
+
* @param sheetId - The id of the sheet.
|
|
139
|
+
* @param margin - The margin preset ({@linkcode PluginSheetMargin}).
|
|
140
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
141
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
142
|
+
*
|
|
143
|
+
* @examplePrompt Set the sheet margin to half an inch
|
|
144
|
+
* @examplePrompt Remove the margins on sheet_1
|
|
145
|
+
* @examplePrompt Give the cover sheet a 10mm margin
|
|
146
|
+
*
|
|
147
|
+
* # Example
|
|
148
|
+
* ```ts
|
|
149
|
+
* const sheet = await snaptrude.presentation.sheets.setMargin("sheet_1", 0.5)
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
public abstract setMargin(
|
|
153
|
+
sheetId: string,
|
|
154
|
+
margin: PluginSheetMargin,
|
|
155
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Place a saved view onto a sheet.
|
|
159
|
+
*
|
|
160
|
+
* Drops the given view onto the sheet through the **native view drop** — the
|
|
161
|
+
* placed shape is a live linked view (the same shape the Present views panel's
|
|
162
|
+
* drag-drop creates), re-rendered from the current model, so
|
|
163
|
+
* {@linkcode PluginPresentationSheetsApi.updatePlacedView} refreshes it later.
|
|
164
|
+
* 2D and site-plan views are placed at an architectural scale: the closest
|
|
165
|
+
* standard scale by default (the native auto-fit), or the explicit `scale`
|
|
166
|
+
* when given — one of the standard values the placed view's Scale dropdown
|
|
167
|
+
* offers for the project's unit system (metric `10, 20, 50, 100, 150, 200,
|
|
168
|
+
* 250, 500, 1000`; imperial e.g. `48` for 1/4″ = 1′, `96` for 1/8″ = 1′,
|
|
169
|
+
* `120` for 1″ = 10′). 3D views have no scale — passing `scale` for one
|
|
170
|
+
* throws. Requires Present mode to be open.
|
|
171
|
+
*
|
|
172
|
+
* @param sheetId - The id of the sheet to place onto.
|
|
173
|
+
* @param viewId - The id of the saved view to place.
|
|
174
|
+
* @param options - Optional `position` ({@linkcode PluginSheetPosition}) —
|
|
175
|
+
* where to place it (sheet centre when omitted) — and `scale` — a standard
|
|
176
|
+
* scale value for the project's unit system (2D/site-plan views only;
|
|
177
|
+
* auto-fit when omitted).
|
|
178
|
+
* @returns A {@linkcode PluginPresentationSheetsPlaceResult} with the created
|
|
179
|
+
* `shapeId`.
|
|
180
|
+
* @throws If Present mode is not open, the sheet/view id is invalid, `scale`
|
|
181
|
+
* is not a standard value for the project's unit system, or `scale` is
|
|
182
|
+
* passed for a 3D view.
|
|
183
|
+
*
|
|
184
|
+
* @examplePrompt Place the floor plan on Sheet 1
|
|
185
|
+
* @examplePrompt Add this 3D view to the cover sheet
|
|
186
|
+
* @examplePrompt Drop the site plan onto the layout sheet at 100, 200
|
|
187
|
+
* @examplePrompt Put the Ground Floor view on sheet_1 at 1:100 scale
|
|
188
|
+
* @examplePrompt Place the plan on the cover sheet at quarter-inch scale
|
|
189
|
+
*
|
|
190
|
+
* # Example
|
|
191
|
+
* ```ts
|
|
192
|
+
* const { shapeId } = await snaptrude.presentation.sheets.place("sheet_1", "view_123", {
|
|
193
|
+
* scale: 100, // 1:100 (metric project)
|
|
194
|
+
* })
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
public abstract place(
|
|
198
|
+
sheetId: string,
|
|
199
|
+
viewId: string,
|
|
200
|
+
options?: { position?: PluginSheetPosition; scale?: number },
|
|
201
|
+
): PluginApiReturn<PluginPresentationSheetsPlaceResult>
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Move an existing drawing onto a sheet without copying or regenerating it.
|
|
205
|
+
*
|
|
206
|
+
* The position is sheet-local and defaults to the sheet centre. The drawing's
|
|
207
|
+
* stable id remains unchanged; `shapeId` therefore identifies the moved drawing.
|
|
208
|
+
*
|
|
209
|
+
* @param sheetId - The id of the destination sheet.
|
|
210
|
+
* @param drawingId - The id of an existing drawing deliverable.
|
|
211
|
+
* @param options - Optional sheet-local `position` (sheet centre when omitted).
|
|
212
|
+
* @returns A {@linkcode PluginPresentationSheetsPlaceResult} containing the drawing shape id.
|
|
213
|
+
* @throws If Present mode is closed, either id is invalid, or the shape is not a drawing.
|
|
214
|
+
*
|
|
215
|
+
* @examplePrompt Move this drawing onto the cover sheet
|
|
216
|
+
* @examplePrompt Place drawing_1 at the center of sheet_2
|
|
217
|
+
*/
|
|
218
|
+
public abstract placeDrawing(
|
|
219
|
+
sheetId: string,
|
|
220
|
+
drawingId: string,
|
|
221
|
+
options?: { position?: PluginSheetPosition },
|
|
222
|
+
): PluginApiReturn<PluginPresentationSheetsPlaceResult>
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Rename a layout sheet.
|
|
226
|
+
*
|
|
227
|
+
* Sets the sheet's display name — the same label the sheets panel shows and
|
|
228
|
+
* that `list`/`get` read back. Requires Present mode to be open.
|
|
229
|
+
*
|
|
230
|
+
* @param sheetId - The id of the sheet to rename.
|
|
231
|
+
* @param name - The new display name (non-empty after trimming).
|
|
232
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
233
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
234
|
+
*
|
|
235
|
+
* @examplePrompt Rename sheet_1 to Cover
|
|
236
|
+
* @examplePrompt Call the first sheet Ground Floor
|
|
237
|
+
* @examplePrompt Change this sheet's name to Site Plan
|
|
238
|
+
*
|
|
239
|
+
* # Example
|
|
240
|
+
* ```ts
|
|
241
|
+
* const sheet = await snaptrude.presentation.sheets.rename("sheet_1", "Cover")
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
public abstract rename(
|
|
245
|
+
sheetId: string,
|
|
246
|
+
name: string,
|
|
247
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Delete a layout sheet.
|
|
251
|
+
*
|
|
252
|
+
* Removes the sheet (and its placed content) from the presentation and
|
|
253
|
+
* renumbers the remaining sheets. Requires Present mode to be open. Auto-diagram
|
|
254
|
+
* sheets cannot be deleted through the API — remove those from the Present UI.
|
|
255
|
+
*
|
|
256
|
+
* @param sheetId - The id of the sheet to delete.
|
|
257
|
+
* @returns The id of the deleted sheet
|
|
258
|
+
* (a {@linkcode PluginPresentationSheetsDeleteResult}).
|
|
259
|
+
* @throws If Present mode is not open, the sheet id is invalid, or the sheet is
|
|
260
|
+
* an auto-diagram sheet.
|
|
261
|
+
*
|
|
262
|
+
* @examplePrompt Delete sheet_2
|
|
263
|
+
* @examplePrompt Remove the Cover sheet
|
|
264
|
+
* @examplePrompt Get rid of the last layout sheet
|
|
265
|
+
*
|
|
266
|
+
* # Example
|
|
267
|
+
* ```ts
|
|
268
|
+
* const { id } = await snaptrude.presentation.sheets.delete("sheet_2")
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
public abstract delete(
|
|
272
|
+
sheetId: string,
|
|
273
|
+
): PluginApiReturn<PluginPresentationSheetsDeleteResult>
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Move a sheet to a new position in the sheet order.
|
|
277
|
+
*
|
|
278
|
+
* Reorders the sheet to the given zero-based `index` (as the sheets panel does
|
|
279
|
+
* when a sheet is dragged) and renumbers the rest. `index` is clamped to the
|
|
280
|
+
* valid range. Requires Present mode to be open.
|
|
281
|
+
*
|
|
282
|
+
* @param sheetId - The id of the sheet to move.
|
|
283
|
+
* @param index - Zero-based target position in the sheet order.
|
|
284
|
+
* @returns The sheets in their new order
|
|
285
|
+
* (a {@linkcode PluginPresentationSheetsListResult}).
|
|
286
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
287
|
+
*
|
|
288
|
+
* @examplePrompt Move sheet_3 to the front
|
|
289
|
+
* @examplePrompt Make the Cover sheet the first sheet
|
|
290
|
+
* @examplePrompt Reorder this sheet to position 2
|
|
291
|
+
*
|
|
292
|
+
* # Example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const { sheets } = await snaptrude.presentation.sheets.reorder("sheet_3", 0)
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
public abstract reorder(
|
|
298
|
+
sheetId: string,
|
|
299
|
+
index: number,
|
|
300
|
+
): PluginApiReturn<PluginPresentationSheetsListResult>
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Make a sheet the active sheet.
|
|
304
|
+
*
|
|
305
|
+
* Selects the sheet in the sheets panel and navigates the Present canvas to it
|
|
306
|
+
* (the same as clicking it in the panel). Requires Present mode to be open.
|
|
307
|
+
*
|
|
308
|
+
* @param sheetId - The id of the sheet to activate.
|
|
309
|
+
* @returns The now-active {@linkcode PluginPresentationSheet}.
|
|
310
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
311
|
+
*
|
|
312
|
+
* @examplePrompt Go to sheet_1
|
|
313
|
+
* @examplePrompt Open the Cover sheet
|
|
314
|
+
* @examplePrompt Switch to the Site Plan sheet
|
|
315
|
+
*
|
|
316
|
+
* # Example
|
|
317
|
+
* ```ts
|
|
318
|
+
* await snaptrude.presentation.sheets.setActive("sheet_1")
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
public abstract setActive(
|
|
322
|
+
sheetId: string,
|
|
323
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Refresh placed views to the current model state.
|
|
327
|
+
*
|
|
328
|
+
* Re-renders the presentation's placed **views** — the live linked view shapes —
|
|
329
|
+
* from the current model (the "Update views" action). Views placed with
|
|
330
|
+
* {@linkcode PluginPresentationSheetsApi.place} are live view shapes too, so
|
|
331
|
+
* they refresh along with panel-dropped ones. Pass `sheetId` to refresh only
|
|
332
|
+
* the views on that sheet, or omit it to refresh every placed view. Requires
|
|
333
|
+
* Present mode to be open.
|
|
334
|
+
*
|
|
335
|
+
* @param options - Optional `sheetId` — restrict the refresh to one sheet's
|
|
336
|
+
* placed views (all placed views when omitted).
|
|
337
|
+
* @returns The ids of the placed view shapes submitted for refresh
|
|
338
|
+
* (a {@linkcode PluginPresentationSheetsUpdatePlacedViewResult}).
|
|
339
|
+
* @throws If Present mode is not open, or `sheetId` is given but invalid.
|
|
340
|
+
*
|
|
341
|
+
* @examplePrompt Update all the placed views to the latest model
|
|
342
|
+
* @examplePrompt Refresh the views on sheet_1
|
|
343
|
+
* @examplePrompt Re-render the placed views after my edits
|
|
344
|
+
*
|
|
345
|
+
* # Example
|
|
346
|
+
* ```ts
|
|
347
|
+
* const { shapeIds } = await snaptrude.presentation.sheets.updatePlacedView()
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
public abstract updatePlacedView(options?: {
|
|
351
|
+
sheetId?: string
|
|
352
|
+
}): PluginApiReturn<PluginPresentationSheetsUpdatePlacedViewResult>
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Standard paper-size presets for layout sheets — identical to the sheet
|
|
357
|
+
* header's size dropdown in Present mode.
|
|
358
|
+
*/
|
|
359
|
+
export const PluginSheetSize = z.enum([
|
|
360
|
+
"ANSI_A",
|
|
361
|
+
"ANSI_B",
|
|
362
|
+
"ANSI_C",
|
|
363
|
+
"ANSI_D",
|
|
364
|
+
"ANSI_E",
|
|
365
|
+
"ARCH_A",
|
|
366
|
+
"ARCH_B",
|
|
367
|
+
"ARCH_C",
|
|
368
|
+
"ARCH_D",
|
|
369
|
+
"ARCH_E",
|
|
370
|
+
"ARCH_E1",
|
|
371
|
+
"ISO_A4",
|
|
372
|
+
"ISO_A3",
|
|
373
|
+
"ISO_A2",
|
|
374
|
+
"ISO_A1",
|
|
375
|
+
"ISO_A0",
|
|
376
|
+
])
|
|
377
|
+
export type PluginSheetSize = z.infer<typeof PluginSheetSize>
|
|
378
|
+
|
|
379
|
+
/** Sheet orientation. */
|
|
380
|
+
export const PluginSheetOrientation = z.enum(["landscape", "portrait"])
|
|
381
|
+
export type PluginSheetOrientation = z.infer<typeof PluginSheetOrientation>
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Canonical sheet margin presets — unit-agnostic values matching the sheet
|
|
385
|
+
* header's margin dropdown: `0` (None), `0.25`, `0.5`, `0.75`, `1`.
|
|
386
|
+
* Displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial projects and
|
|
387
|
+
* None / 5mm / 10mm / 15mm / 20mm on metric ones.
|
|
388
|
+
*/
|
|
389
|
+
export const PluginSheetMargin = z.union([
|
|
390
|
+
z.literal(0),
|
|
391
|
+
z.literal(0.25),
|
|
392
|
+
z.literal(0.5),
|
|
393
|
+
z.literal(0.75),
|
|
394
|
+
z.literal(1),
|
|
395
|
+
])
|
|
396
|
+
export type PluginSheetMargin = z.infer<typeof PluginSheetMargin>
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* A layout sheet in the presentation.
|
|
400
|
+
*
|
|
401
|
+
* | Property | Type | Description |
|
|
402
|
+
* |---|---|---|
|
|
403
|
+
* | `id` | `string` | Unique sheet id |
|
|
404
|
+
* | `name` | `string` | Display name |
|
|
405
|
+
* | `size` | {@linkcode PluginSheetSize}` \| null` | Paper preset (`null` for a legacy sheet without one) |
|
|
406
|
+
* | `orientation` | {@linkcode PluginSheetOrientation}` \| null` | Orientation (`null` for a legacy sheet) |
|
|
407
|
+
* | `margin` | {@linkcode PluginSheetMargin}` \| null` | Margin preset (`null` when absent/unrecognized) |
|
|
408
|
+
*/
|
|
409
|
+
export const PluginPresentationSheet = z.object({
|
|
410
|
+
id: z.string(),
|
|
411
|
+
name: z.string(),
|
|
412
|
+
size: PluginSheetSize.nullable(),
|
|
413
|
+
orientation: PluginSheetOrientation.nullable(),
|
|
414
|
+
margin: PluginSheetMargin.nullable(),
|
|
415
|
+
})
|
|
416
|
+
export type PluginPresentationSheet = z.infer<typeof PluginPresentationSheet>
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* A position on a sheet/canvas (sheet coordinates).
|
|
420
|
+
*
|
|
421
|
+
* | Property | Type | Description |
|
|
422
|
+
* |---|---|---|
|
|
423
|
+
* | `x` | `number` | X coordinate |
|
|
424
|
+
* | `y` | `number` | Y coordinate |
|
|
425
|
+
*/
|
|
426
|
+
export const PluginSheetPosition = z.object({
|
|
427
|
+
x: z.number(),
|
|
428
|
+
y: z.number(),
|
|
429
|
+
})
|
|
430
|
+
export type PluginSheetPosition = z.infer<typeof PluginSheetPosition>
|
|
431
|
+
|
|
432
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.list}. */
|
|
433
|
+
export const PluginPresentationSheetsListResult = z.object({
|
|
434
|
+
sheets: z.array(PluginPresentationSheet),
|
|
435
|
+
})
|
|
436
|
+
export type PluginPresentationSheetsListResult = z.infer<
|
|
437
|
+
typeof PluginPresentationSheetsListResult
|
|
438
|
+
>
|
|
439
|
+
|
|
440
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.get}. */
|
|
441
|
+
export const PluginPresentationSheetsGetArgs = z.object({
|
|
442
|
+
id: z.string(),
|
|
443
|
+
})
|
|
444
|
+
export type PluginPresentationSheetsGetArgs = z.infer<
|
|
445
|
+
typeof PluginPresentationSheetsGetArgs
|
|
446
|
+
>
|
|
447
|
+
|
|
448
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.get} — the sheet, or `null`. */
|
|
449
|
+
export const PluginPresentationSheetsGetResult =
|
|
450
|
+
PluginPresentationSheet.nullable()
|
|
451
|
+
export type PluginPresentationSheetsGetResult = z.infer<
|
|
452
|
+
typeof PluginPresentationSheetsGetResult
|
|
453
|
+
>
|
|
454
|
+
|
|
455
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.create}. */
|
|
456
|
+
export const PluginPresentationSheetsCreateArgs = z.object({
|
|
457
|
+
name: z.string().optional(),
|
|
458
|
+
size: PluginSheetSize.optional(),
|
|
459
|
+
orientation: PluginSheetOrientation.optional(),
|
|
460
|
+
})
|
|
461
|
+
export type PluginPresentationSheetsCreateArgs = z.infer<
|
|
462
|
+
typeof PluginPresentationSheetsCreateArgs
|
|
463
|
+
>
|
|
464
|
+
|
|
465
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setSize}. */
|
|
466
|
+
export const PluginPresentationSheetsSetSizeArgs = z.object({
|
|
467
|
+
sheetId: z.string(),
|
|
468
|
+
size: PluginSheetSize,
|
|
469
|
+
orientation: PluginSheetOrientation.optional(),
|
|
470
|
+
})
|
|
471
|
+
export type PluginPresentationSheetsSetSizeArgs = z.infer<
|
|
472
|
+
typeof PluginPresentationSheetsSetSizeArgs
|
|
473
|
+
>
|
|
474
|
+
|
|
475
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setMargin}. */
|
|
476
|
+
export const PluginPresentationSheetsSetMarginArgs = z.object({
|
|
477
|
+
sheetId: z.string(),
|
|
478
|
+
margin: PluginSheetMargin,
|
|
479
|
+
})
|
|
480
|
+
export type PluginPresentationSheetsSetMarginArgs = z.infer<
|
|
481
|
+
typeof PluginPresentationSheetsSetMarginArgs
|
|
482
|
+
>
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.place}.
|
|
486
|
+
*
|
|
487
|
+
* | Property | Type | Description |
|
|
488
|
+
* |---|---|---|
|
|
489
|
+
* | `sheetId` | `string` | The sheet to place onto |
|
|
490
|
+
* | `viewId` | `string` | The saved view to place |
|
|
491
|
+
* | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Where to place it (sheet centre when omitted) |
|
|
492
|
+
* | `scale` | `number \| undefined` | Standard scale value for the project's unit system (2D/site-plan views only; auto-fit to the closest standard scale when omitted) |
|
|
493
|
+
*/
|
|
494
|
+
export const PluginPresentationSheetsPlaceArgs = z.object({
|
|
495
|
+
sheetId: z.string(),
|
|
496
|
+
viewId: z.string(),
|
|
497
|
+
position: PluginSheetPosition.optional(),
|
|
498
|
+
scale: z.number().positive().optional(),
|
|
499
|
+
})
|
|
500
|
+
export type PluginPresentationSheetsPlaceArgs = z.infer<
|
|
501
|
+
typeof PluginPresentationSheetsPlaceArgs
|
|
502
|
+
>
|
|
503
|
+
|
|
504
|
+
/** Arguments for moving an existing drawing onto a sheet. */
|
|
505
|
+
export const PluginPresentationSheetsPlaceDrawingArgs = z.object({
|
|
506
|
+
sheetId: z.string().min(1),
|
|
507
|
+
drawingId: z.string().min(1),
|
|
508
|
+
position: PluginSheetPosition.optional(),
|
|
509
|
+
})
|
|
510
|
+
export type PluginPresentationSheetsPlaceDrawingArgs = z.infer<
|
|
511
|
+
typeof PluginPresentationSheetsPlaceDrawingArgs
|
|
512
|
+
>
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Result of {@linkcode PluginPresentationSheetsApi.place}.
|
|
516
|
+
*
|
|
517
|
+
* | Property | Type | Description |
|
|
518
|
+
* |---|---|---|
|
|
519
|
+
* | `shapeId` | `string` | Id of the created canvas shape |
|
|
520
|
+
*/
|
|
521
|
+
export const PluginPresentationSheetsPlaceResult = z.object({
|
|
522
|
+
shapeId: z.string(),
|
|
523
|
+
})
|
|
524
|
+
export type PluginPresentationSheetsPlaceResult = z.infer<
|
|
525
|
+
typeof PluginPresentationSheetsPlaceResult
|
|
526
|
+
>
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.rename}.
|
|
530
|
+
*
|
|
531
|
+
* | Property | Type | Description |
|
|
532
|
+
* |---|---|---|
|
|
533
|
+
* | `sheetId` | `string` | The sheet to rename |
|
|
534
|
+
* | `name` | `string` | New display name (non-empty after trimming) |
|
|
535
|
+
*/
|
|
536
|
+
export const PluginPresentationSheetsRenameArgs = z.object({
|
|
537
|
+
sheetId: z.string(),
|
|
538
|
+
name: z.string().trim().min(1),
|
|
539
|
+
})
|
|
540
|
+
export type PluginPresentationSheetsRenameArgs = z.infer<
|
|
541
|
+
typeof PluginPresentationSheetsRenameArgs
|
|
542
|
+
>
|
|
543
|
+
|
|
544
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.delete}. */
|
|
545
|
+
export const PluginPresentationSheetsDeleteArgs = z.object({
|
|
546
|
+
sheetId: z.string(),
|
|
547
|
+
})
|
|
548
|
+
export type PluginPresentationSheetsDeleteArgs = z.infer<
|
|
549
|
+
typeof PluginPresentationSheetsDeleteArgs
|
|
550
|
+
>
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Result of {@linkcode PluginPresentationSheetsApi.delete}.
|
|
554
|
+
*
|
|
555
|
+
* | Property | Type | Description |
|
|
556
|
+
* |---|---|---|
|
|
557
|
+
* | `id` | `string` | Id of the deleted sheet |
|
|
558
|
+
*/
|
|
559
|
+
export const PluginPresentationSheetsDeleteResult = z.object({
|
|
560
|
+
id: z.string(),
|
|
561
|
+
})
|
|
562
|
+
export type PluginPresentationSheetsDeleteResult = z.infer<
|
|
563
|
+
typeof PluginPresentationSheetsDeleteResult
|
|
564
|
+
>
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.reorder}.
|
|
568
|
+
*
|
|
569
|
+
* | Property | Type | Description |
|
|
570
|
+
* |---|---|---|
|
|
571
|
+
* | `sheetId` | `string` | The sheet to move |
|
|
572
|
+
* | `index` | `number` | Zero-based target position (clamped to range) |
|
|
573
|
+
*/
|
|
574
|
+
export const PluginPresentationSheetsReorderArgs = z.object({
|
|
575
|
+
sheetId: z.string(),
|
|
576
|
+
index: z.number().int().min(0),
|
|
577
|
+
})
|
|
578
|
+
export type PluginPresentationSheetsReorderArgs = z.infer<
|
|
579
|
+
typeof PluginPresentationSheetsReorderArgs
|
|
580
|
+
>
|
|
581
|
+
|
|
582
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setActive}. */
|
|
583
|
+
export const PluginPresentationSheetsSetActiveArgs = z.object({
|
|
584
|
+
sheetId: z.string(),
|
|
585
|
+
})
|
|
586
|
+
export type PluginPresentationSheetsSetActiveArgs = z.infer<
|
|
587
|
+
typeof PluginPresentationSheetsSetActiveArgs
|
|
588
|
+
>
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
|
|
592
|
+
*
|
|
593
|
+
* | Property | Type | Description |
|
|
594
|
+
* |---|---|---|
|
|
595
|
+
* | `sheetId` | `string`? | Restrict the refresh to one sheet's placed views |
|
|
596
|
+
*/
|
|
597
|
+
export const PluginPresentationSheetsUpdatePlacedViewArgs = z.object({
|
|
598
|
+
sheetId: z.string().optional(),
|
|
599
|
+
})
|
|
600
|
+
export type PluginPresentationSheetsUpdatePlacedViewArgs = z.infer<
|
|
601
|
+
typeof PluginPresentationSheetsUpdatePlacedViewArgs
|
|
602
|
+
>
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Result of {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
|
|
606
|
+
*
|
|
607
|
+
* | Property | Type | Description |
|
|
608
|
+
* |---|---|---|
|
|
609
|
+
* | `shapeIds` | `string[]` | Ids of the placed view shapes submitted for refresh |
|
|
610
|
+
*/
|
|
611
|
+
export const PluginPresentationSheetsUpdatePlacedViewResult = z.object({
|
|
612
|
+
shapeIds: z.array(z.string()),
|
|
613
|
+
})
|
|
614
|
+
export type PluginPresentationSheetsUpdatePlacedViewResult = z.infer<
|
|
615
|
+
typeof PluginPresentationSheetsUpdatePlacedViewResult
|
|
616
|
+
>
|