@snaptrude/plugin-core 0.10.0 → 0.11.0-rc.1

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +24 -2
  2. package/api-manifest.full.json +6928 -0
  3. package/api-manifest.json +85 -4
  4. package/dist/api/core/camera/index.d.ts +16 -0
  5. package/dist/api/core/camera/index.d.ts.map +1 -1
  6. package/dist/api/core/project/index.d.ts +68 -1
  7. package/dist/api/core/project/index.d.ts.map +1 -1
  8. package/dist/api/core/storeys/index.d.ts +14 -0
  9. package/dist/api/core/storeys/index.d.ts.map +1 -1
  10. package/dist/api/design/create/index.d.ts +29 -6
  11. package/dist/api/design/create/index.d.ts.map +1 -1
  12. package/dist/api/design/delete/index.d.ts +20 -2
  13. package/dist/api/design/delete/index.d.ts.map +1 -1
  14. package/dist/api/design/furniture/index.d.ts +33 -0
  15. package/dist/api/design/furniture/index.d.ts.map +1 -1
  16. package/dist/api/design/query/index.d.ts +2 -0
  17. package/dist/api/design/query/index.d.ts.map +1 -1
  18. package/dist/api/design/query/spaces.d.ts +61 -0
  19. package/dist/api/design/query/spaces.d.ts.map +1 -1
  20. package/dist/api/design/visibility.d.ts +28 -0
  21. package/dist/api/design/visibility.d.ts.map +1 -1
  22. package/dist/api/entity/space.d.ts +3 -0
  23. package/dist/api/entity/space.d.ts.map +1 -1
  24. package/dist/api/presentation/placedViews.d.ts +35 -1
  25. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  26. package/dist/api/presentation/sheets.d.ts +20 -2
  27. package/dist/api/presentation/sheets.d.ts.map +1 -1
  28. package/dist/errors/codes.d.ts +8 -3
  29. package/dist/errors/codes.d.ts.map +1 -1
  30. package/dist/index.cjs +69 -3
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +62 -3
  33. package/dist/index.js.map +1 -1
  34. package/package.json +13 -13
  35. package/snaptrude-plugin-core-0.11.0.tgz +0 -0
  36. package/src/api/core/camera/index.ts +17 -0
  37. package/src/api/core/project/index.ts +62 -1
  38. package/src/api/core/storeys/index.ts +15 -0
  39. package/src/api/design/create/index.ts +34 -8
  40. package/src/api/design/delete/index.ts +20 -1
  41. package/src/api/design/furniture/index.ts +34 -0
  42. package/src/api/design/query/index.ts +2 -0
  43. package/src/api/design/query/spaces.ts +68 -0
  44. package/src/api/design/visibility.ts +34 -0
  45. package/src/api/entity/space.ts +2 -0
  46. package/src/api/presentation/placedViews.ts +29 -1
  47. package/src/api/presentation/sheets.ts +19 -3
  48. package/src/errors/codes.ts +30 -2
  49. package/test/errors.test.mjs +4 -0
package/dist/index.js CHANGED
@@ -887,6 +887,14 @@ var PluginGridValueArgs = z21.object({
887
887
  var PluginToleranceArgs = z21.object({
888
888
  value: z21.number()
889
889
  });
890
+ var PluginProjectInfo = z21.object({
891
+ projectId: z21.string(),
892
+ name: z21.string().nullable(),
893
+ units: PUnitType,
894
+ activeStorey: z21.number(),
895
+ storeyCount: z21.number(),
896
+ location: z21.object({ latitude: z21.number(), longitude: z21.number() }).nullable()
897
+ });
890
898
 
891
899
  // src/api/core/comment/index.ts
892
900
  import * as z22 from "zod";
@@ -1920,7 +1928,8 @@ var PluginSpaceUpdateResult = z38.object({
1920
1928
  massType: z38.string().optional(),
1921
1929
  spaceType: z38.string().optional(),
1922
1930
  areaClass: PluginAreaClass.optional(),
1923
- departmentId: z38.string().nullable().optional()
1931
+ departmentId: z38.string().nullable().optional(),
1932
+ rebuilt: z38.boolean().optional()
1924
1933
  });
1925
1934
  var PluginSpaceBulkCreateItem = z38.discriminatedUnion("kind", [
1926
1935
  z38.object({
@@ -2249,6 +2258,14 @@ var PluginSpaceEnclosure = z41.object({
2249
2258
  surfaces: z41.array(PluginEnclosureSurface),
2250
2259
  adjacentSpaces: z41.array(PluginAdjacentSpace)
2251
2260
  });
2261
+ var PluginDesignQuerySpacesListGeneratedBimArgs = z41.object({
2262
+ space: ComponentHandle
2263
+ });
2264
+ var PluginSpaceGeneratedBim = z41.object({
2265
+ walls: z41.array(ComponentHandle),
2266
+ floors: z41.array(ComponentHandle),
2267
+ slabs: z41.array(ComponentHandle)
2268
+ });
2252
2269
 
2253
2270
  // src/api/design/query/referenceLines.ts
2254
2271
  var PluginDesignQueryReferenceLinesApi = class {
@@ -2319,6 +2336,7 @@ var PluginEntityProperties = z42.object({
2319
2336
  isLocked: z42.boolean(),
2320
2337
  isHidden: z42.boolean(),
2321
2338
  isSelected: z42.boolean(),
2339
+ isVisible: z42.boolean(),
2322
2340
  boundingBox: BBoxComponents,
2323
2341
  adjacency: z42.array(z42.object({ spaceId: z42.string(), value: z42.number() }))
2324
2342
  }).partial();
@@ -2668,6 +2686,9 @@ import * as z50 from "zod";
2668
2686
  var PluginDesignDeleteEntitiesArgs = z50.object({
2669
2687
  components: z50.array(ComponentHandle).min(1)
2670
2688
  });
2689
+ var PluginDesignDeleteResult = PluginDesignChangeResult.extend({
2690
+ cascaded: z50.array(ComponentHandle).optional()
2691
+ });
2671
2692
  var PluginDesignDeleteApi = class {
2672
2693
  constructor() {
2673
2694
  }
@@ -2848,6 +2869,9 @@ var PluginDesignVisibilityApi = class {
2848
2869
  var PluginDesignVisibilityHideArgs = z56.object({
2849
2870
  components: z56.array(ComponentHandle)
2850
2871
  });
2872
+ var PluginDesignVisibilityShowArgs = z56.object({
2873
+ components: z56.array(ComponentHandle)
2874
+ });
2851
2875
  var PluginDesignVisibilityIsolateArgs = z56.object({
2852
2876
  components: z56.array(ComponentHandle)
2853
2877
  });
@@ -3958,6 +3982,7 @@ var PluginSheetPosition = z70.object({
3958
3982
  x: z70.number(),
3959
3983
  y: z70.number()
3960
3984
  });
3985
+ var PluginViewLod = z70.enum(["design", "bim"]);
3961
3986
  var PluginPresentationSheetsListResult = z70.object({
3962
3987
  sheets: z70.array(PluginPresentationSheet)
3963
3988
  });
@@ -3983,7 +4008,8 @@ var PluginPresentationSheetsPlaceArgs = z70.object({
3983
4008
  sheetId: z70.string(),
3984
4009
  viewId: z70.string(),
3985
4010
  position: PluginSheetPosition.optional(),
3986
- scale: z70.number().positive().optional()
4011
+ scale: z70.number().positive().optional(),
4012
+ lod: PluginViewLod.optional()
3987
4013
  });
3988
4014
  var PluginPresentationSheetsPlaceResult = z70.object({
3989
4015
  shapeId: z70.string()
@@ -4040,7 +4066,9 @@ var PluginPlacedView = z71.object({
4040
4066
  is3d: z71.boolean(),
4041
4067
  rotation: z71.number(),
4042
4068
  crop: PluginPlacedViewCrop.nullable(),
4043
- isUnlinked: z71.boolean()
4069
+ isUnlinked: z71.boolean(),
4070
+ lod: PluginViewLod.optional(),
4071
+ inactiveBuildingMask: z71.boolean().optional()
4044
4072
  });
4045
4073
  var PluginPresentationPlacedViewsListArgs = z71.object({
4046
4074
  sheetId: z71.string().optional()
@@ -4181,6 +4209,10 @@ var PluginPlacedViewsSetMaskArgs = z71.object({
4181
4209
  shapeId: z71.string().min(1),
4182
4210
  enabled: z71.boolean()
4183
4211
  });
4212
+ var PluginPlacedViewsSetLodArgs = z71.object({
4213
+ shapeId: z71.string().min(1),
4214
+ lod: PluginViewLod
4215
+ });
4184
4216
 
4185
4217
  // src/api/presentation/diagrams.ts
4186
4218
  import * as z72 from "zod";
@@ -5347,6 +5379,10 @@ var PLUGIN_ERROR_CODES = [
5347
5379
  "NO_ACTIVE_STRUCTURE",
5348
5380
  "NO_ELIGIBLE_ELEMENTS",
5349
5381
  "PROPOSAL_SWITCH_BLOCKED",
5382
+ "HANDLE_STALE",
5383
+ "KIND_HIDDEN_IN_MODE",
5384
+ "MERGED_INTO_EXISTING",
5385
+ "BLOCKED_IN_BIM",
5350
5386
  "INTERNAL",
5351
5387
  "UNKNOWN"
5352
5388
  ];
@@ -5404,6 +5440,22 @@ var CODE_META = {
5404
5440
  category: "execution",
5405
5441
  hintTemplate: "Wait for the in-canvas agent run to finish, then retry."
5406
5442
  },
5443
+ HANDLE_STALE: {
5444
+ category: "handle",
5445
+ hintTemplate: "The entity was retired by a parametric resolution (merge/split/rebuild); re-query for its successor."
5446
+ },
5447
+ KIND_HIDDEN_IN_MODE: {
5448
+ category: "execution",
5449
+ hintTemplate: "This entity kind has no representation in the current mode/LOD; switch mode or target a visible kind."
5450
+ },
5451
+ MERGED_INTO_EXISTING: {
5452
+ category: "execution",
5453
+ hintTemplate: "The created geometry merged into an existing entity; use the surviving handles from details."
5454
+ },
5455
+ BLOCKED_IN_BIM: {
5456
+ category: "execution",
5457
+ hintTemplate: "This operation is unavailable in BIM mode; switch to Design and retry."
5458
+ },
5407
5459
  INTERNAL: {
5408
5460
  category: "internal",
5409
5461
  hintTemplate: "Host-side fault. Report with errorId."
@@ -5839,6 +5891,7 @@ export {
5839
5891
  PluginDesignCreateWindowArgs,
5840
5892
  PluginDesignDeleteApi,
5841
5893
  PluginDesignDeleteEntitiesArgs,
5894
+ PluginDesignDeleteResult,
5842
5895
  PluginDesignDoorArgs,
5843
5896
  PluginDesignDoorExistsArgs,
5844
5897
  PluginDesignDoorGetCatalogItemArgs,
@@ -5893,6 +5946,7 @@ export {
5893
5946
  PluginDesignQuerySpacesGetEnclosureArgs,
5894
5947
  PluginDesignQuerySpacesGetProperty,
5895
5948
  PluginDesignQuerySpacesGetResult,
5949
+ PluginDesignQuerySpacesListGeneratedBimArgs,
5896
5950
  PluginDesignRotateArgs,
5897
5951
  PluginDesignSelectionAddArgs,
5898
5952
  PluginDesignSelectionApi,
@@ -5915,6 +5969,7 @@ export {
5915
5969
  PluginDesignVisibilityApi,
5916
5970
  PluginDesignVisibilityHideArgs,
5917
5971
  PluginDesignVisibilityIsolateArgs,
5972
+ PluginDesignVisibilityShowArgs,
5918
5973
  PluginDesignWindowArgs,
5919
5974
  PluginDesignWindowExistsArgs,
5920
5975
  PluginDesignWindowGetCatalogItemArgs,
@@ -6168,6 +6223,7 @@ export {
6168
6223
  PluginPlacedViewsMoveShapeArgs,
6169
6224
  PluginPlacedViewsResizeShapeArgs,
6170
6225
  PluginPlacedViewsSetLabelHiddenArgs,
6226
+ PluginPlacedViewsSetLodArgs,
6171
6227
  PluginPlacedViewsSetMaskArgs,
6172
6228
  PluginPlacedViewsSetOpacityArgs,
6173
6229
  PluginPlacedViewsUpdateFontStylesArgs,
@@ -6391,6 +6447,7 @@ export {
6391
6447
  PluginProgramSpreadsheetTransactionArgs,
6392
6448
  PluginProgramSpreadsheetTransactionResult,
6393
6449
  PluginProjectApi,
6450
+ PluginProjectInfo,
6394
6451
  PluginProjectRef,
6395
6452
  PluginProjectSettingsApi,
6396
6453
  PluginQuatApi,
@@ -6448,6 +6505,7 @@ export {
6448
6505
  PluginSpaceCreateRectangularResult,
6449
6506
  PluginSpaceDeleteArgs,
6450
6507
  PluginSpaceEnclosure,
6508
+ PluginSpaceGeneratedBim,
6451
6509
  PluginSpaceGeometryUpdate,
6452
6510
  PluginSpaceGetAllResult,
6453
6511
  PluginSpaceGetArgs,
@@ -6542,6 +6600,7 @@ export {
6542
6600
  PluginVec3Api,
6543
6601
  PluginViewLabelType,
6544
6602
  PluginViewLineStyle,
6603
+ PluginViewLod,
6545
6604
  PluginViewSettingCategory,
6546
6605
  PluginWallUpdates,
6547
6606
  PluginWeatherGetSeriesArgs,