@snaptrude/plugin-core 1.0.1 → 1.0.2-plainpoint-20261102.2

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 (112) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +6 -0
  3. package/api-manifest.json +1682 -118
  4. package/dist/api/core/camera/index.d.ts +16 -6
  5. package/dist/api/core/camera/index.d.ts.map +1 -1
  6. package/dist/api/core/comment/index.d.ts +7 -3
  7. package/dist/api/core/comment/index.d.ts.map +1 -1
  8. package/dist/api/core/geom/create/index.d.ts +69 -21
  9. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  10. package/dist/api/core/geom/query/circle.d.ts +31 -11
  11. package/dist/api/core/geom/query/circle.d.ts.map +1 -1
  12. package/dist/api/core/geom/query/contour.d.ts +19 -7
  13. package/dist/api/core/geom/query/contour.d.ts.map +1 -1
  14. package/dist/api/core/geom/query/curve.d.ts +72 -24
  15. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  16. package/dist/api/core/geom/query/profile.d.ts +19 -7
  17. package/dist/api/core/geom/query/profile.d.ts.map +1 -1
  18. package/dist/api/core/geom/update/contour.d.ts +36 -12
  19. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  20. package/dist/api/core/geom/update/curve.d.ts +13 -5
  21. package/dist/api/core/geom/update/curve.d.ts.map +1 -1
  22. package/dist/api/core/geom/update/profile.d.ts +36 -12
  23. package/dist/api/core/geom/update/profile.d.ts.map +1 -1
  24. package/dist/api/core/io/import/index.d.ts +7 -3
  25. package/dist/api/core/io/import/index.d.ts.map +1 -1
  26. package/dist/api/core/math/quat.d.ts +2 -2
  27. package/dist/api/core/math/quat.d.ts.map +1 -1
  28. package/dist/api/core/math/vec3.d.ts +15 -15
  29. package/dist/api/core/math/vec3.d.ts.map +1 -1
  30. package/dist/api/core/storeys/index.d.ts +5 -0
  31. package/dist/api/core/storeys/index.d.ts.map +1 -1
  32. package/dist/api/design/boolean/index.d.ts +20 -4
  33. package/dist/api/design/boolean/index.d.ts.map +1 -1
  34. package/dist/api/design/create/bulk-items.d.ts +84 -16
  35. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  36. package/dist/api/design/create/index.d.ts +134 -59
  37. package/dist/api/design/create/index.d.ts.map +1 -1
  38. package/dist/api/design/create/opening-fields.d.ts +18 -6
  39. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  40. package/dist/api/design/delete/index.d.ts +14 -7
  41. package/dist/api/design/delete/index.d.ts.map +1 -1
  42. package/dist/api/design/dimensions.d.ts +12 -4
  43. package/dist/api/design/dimensions.d.ts.map +1 -1
  44. package/dist/api/design/edit/index.d.ts +7 -3
  45. package/dist/api/design/edit/index.d.ts.map +1 -1
  46. package/dist/api/design/family.d.ts +5 -1
  47. package/dist/api/design/family.d.ts.map +1 -1
  48. package/dist/api/design/index.d.ts +5 -0
  49. package/dist/api/design/index.d.ts.map +1 -1
  50. package/dist/api/design/lock.d.ts +3 -0
  51. package/dist/api/design/lock.d.ts.map +1 -1
  52. package/dist/api/design/text.d.ts +400 -0
  53. package/dist/api/design/text.d.ts.map +1 -0
  54. package/dist/api/design/transform/index.d.ts +28 -8
  55. package/dist/api/design/transform/index.d.ts.map +1 -1
  56. package/dist/api/entity/space.d.ts +30 -6
  57. package/dist/api/entity/space.d.ts.map +1 -1
  58. package/dist/api/entity/story.d.ts +4 -0
  59. package/dist/api/entity/story.d.ts.map +1 -1
  60. package/dist/api/presentation/drawings.d.ts +46 -1
  61. package/dist/api/presentation/drawings.d.ts.map +1 -1
  62. package/dist/api/presentation/graphics.d.ts +4 -0
  63. package/dist/api/presentation/graphics.d.ts.map +1 -1
  64. package/dist/api/presentation/placedViews.d.ts +29 -1
  65. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  66. package/dist/api/presentation/standards.d.ts +14 -0
  67. package/dist/api/presentation/standards.d.ts.map +1 -1
  68. package/dist/api/presentation/views.d.ts +5 -1
  69. package/dist/api/presentation/views.d.ts.map +1 -1
  70. package/dist/handles.d.ts +8 -0
  71. package/dist/handles.d.ts.map +1 -1
  72. package/dist/index.cjs +2298 -2179
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +2285 -2179
  75. package/dist/index.js.map +1 -1
  76. package/package.json +13 -13
  77. package/src/api/core/camera/index.ts +9 -7
  78. package/src/api/core/comment/index.ts +3 -3
  79. package/src/api/core/geom/create/index.ts +25 -25
  80. package/src/api/core/geom/query/circle.ts +11 -11
  81. package/src/api/core/geom/query/contour.ts +7 -6
  82. package/src/api/core/geom/query/curve.ts +25 -25
  83. package/src/api/core/geom/query/profile.ts +7 -6
  84. package/src/api/core/geom/update/contour.ts +12 -11
  85. package/src/api/core/geom/update/curve.ts +5 -5
  86. package/src/api/core/geom/update/profile.ts +12 -11
  87. package/src/api/core/io/import/index.ts +3 -2
  88. package/src/api/core/math/quat.ts +2 -2
  89. package/src/api/core/math/vec3.ts +16 -16
  90. package/src/api/core/storeys/index.ts +5 -0
  91. package/src/api/design/boolean/index.ts +2 -2
  92. package/src/api/design/create/bulk-items.ts +7 -2
  93. package/src/api/design/create/index.ts +34 -46
  94. package/src/api/design/create/opening-fields.ts +7 -7
  95. package/src/api/design/delete/index.ts +14 -7
  96. package/src/api/design/dimensions.ts +5 -4
  97. package/src/api/design/edit/index.ts +3 -3
  98. package/src/api/design/family.ts +2 -1
  99. package/src/api/design/index.ts +5 -0
  100. package/src/api/design/lock.ts +6 -0
  101. package/src/api/design/text.ts +394 -0
  102. package/src/api/design/transform/index.ts +15 -7
  103. package/src/api/entity/space.ts +5 -4
  104. package/src/api/entity/story.ts +4 -0
  105. package/src/api/presentation/graphics.ts +4 -1
  106. package/src/api/presentation/placedViews.ts +12 -0
  107. package/src/api/presentation/standards.ts +6 -0
  108. package/src/api/presentation/views.ts +7 -2
  109. package/src/handles.ts +11 -0
  110. package/test/designText.test.mjs +72 -0
  111. package/test/handles.test.mjs +36 -0
  112. package/test/paperPensContract.test.mjs +39 -0
@@ -8,6 +8,7 @@ import {
8
8
  CurveHandle,
9
9
  ProfileHandle,
10
10
  Vec3Handle,
11
+ Vec3Input,
11
12
  } from "../../../handles"
12
13
  import { PluginGridStyleOptions } from "./grids"
13
14
  import { PluginGraphicsLineStyleId } from "../../presentation/graphics"
@@ -130,7 +131,7 @@ export abstract class PluginDesignCreateApi {
130
131
  contour: ContourHandle,
131
132
  height: number,
132
133
  label?: string,
133
- position?: Vec3Handle,
134
+ position?: Vec3Input,
134
135
  spaceType?: PluginSpaceType,
135
136
  massType?: PluginMassType,
136
137
  departmentId?: PluginDepartmentId,
@@ -165,7 +166,7 @@ export abstract class PluginDesignCreateApi {
165
166
  contour: ContourHandle,
166
167
  height: number,
167
168
  label?: string,
168
- position?: Vec3Handle,
169
+ position?: Vec3Input,
169
170
  massType?: PluginMassType,
170
171
  ): PluginApiReturn<ComponentHandle>
171
172
 
@@ -288,7 +289,7 @@ export abstract class PluginDesignCreateApi {
288
289
  */
289
290
  public abstract floor(
290
291
  ...args:
291
- | [contour: ContourHandle, thickness: number, position?: Vec3Handle]
292
+ | [contour: ContourHandle, thickness: number, position?: Vec3Input]
292
293
  | [contour: ContourHandle, options: PluginFamilyFloorOptions]
293
294
  ): PluginApiReturn<ComponentHandle[]>
294
295
 
@@ -422,10 +423,10 @@ export abstract class PluginDesignCreateApi {
422
423
  public abstract column(
423
424
  ...args:
424
425
  | [
425
- position: Vec3Handle,
426
+ position: Vec3Input,
426
427
  crossSection: ContourHandle,
427
428
  height: number,
428
- directionUp?: Vec3Handle,
429
+ directionUp?: Vec3Input,
429
430
  ]
430
431
  | [axis: LineHandle, options: PluginFamilyPlacement]
431
432
  ): PluginApiReturn<ComponentHandle>
@@ -472,7 +473,7 @@ export abstract class PluginDesignCreateApi {
472
473
  */
473
474
  public abstract beam(
474
475
  ...args:
475
- | [section: ContourHandle, length: number, direction?: Vec3Handle]
476
+ | [section: ContourHandle, length: number, direction?: Vec3Input]
476
477
  | [axis: LineHandle, options: PluginFamilyPlacement]
477
478
  ): PluginApiReturn<ComponentHandle>
478
479
 
@@ -496,10 +497,10 @@ export abstract class PluginDesignCreateApi {
496
497
  * single undo entry. The storey must already exist
497
498
  * (`core.storeys.create` first). Default: geometry-derived — a profile
498
499
  * drawn at y = 0 lands on storey 1; the ACTIVE storey is NOT consulted.
499
- * @param topProfiles - Optional top edge per curve of `profile` (same order):
500
- * a {@linkcode PluginWallTopProfile} makes that wall raked / gabled; `null`
501
- * or a missing entry keeps it flat at `height`. Straight curves only. Such
502
- * walls are non-parametric (see {@linkcode PluginWallTopProfile}).
500
+ * @param topProfiles - Top edge per curve of `profile` (same order). Current
501
+ * hosts build walls with one height: any non-null entry is refused with
502
+ * `PRECONDITION_FAILED` ("sloped or stepped tops are not supported") and
503
+ * nothing is created. Pass `null` entries or omit it.
503
504
  * @returns a {@linkcode ComponentHandle}`[]` (one per wall), in profile order
504
505
  * @throws if the profile is empty, `wallType` names no wall type in the
505
506
  * project, `storey` does not exist, `topProfiles` has more entries than the
@@ -513,9 +514,6 @@ export abstract class PluginDesignCreateApi {
513
514
  * @examplePrompt Add walls with mitred corners along the path
514
515
  * @examplePrompt Draw brick walls with plaster along this outline
515
516
  * @examplePrompt Build the perimeter in exposed concrete walls
516
- * @examplePrompt Create a raked wall that slopes from 3m to 5m
517
- * @examplePrompt Build a gable end wall with the ridge in the middle
518
- * @examplePrompt Draw a wall with a sloped top edge
519
517
  *
520
518
  * # Example
521
519
  * ```ts
@@ -531,13 +529,6 @@ export abstract class PluginDesignCreateApi {
531
529
  * const brickWalls = await snaptrude.design.create.walls(
532
530
  * centerlines, 3, undefined, brick.label,
533
531
  * )
534
- * // …a raked wall (3m at the start, 5m at the end) on a single centerline:
535
- * const run = await snaptrude.core.geom.create.profileFromCurves([
536
- * await snaptrude.core.geom.create.line(await v.new(0, 0, 10), await v.new(8, 0, 10)),
537
- * ])
538
- * const [raked] = await snaptrude.design.create.walls(run, undefined, 0.2, undefined, undefined, [
539
- * [{ along: 0, height: 3 }, { along: 1, height: 5 }],
540
- * ])
541
532
  * ```
542
533
  *
543
534
  * @performance For MORE THAN ONE run, call `design.create.wallRuns(items[])` — one
@@ -560,8 +551,9 @@ export abstract class PluginDesignCreateApi {
560
551
  * item's profile chain, mitred at shared endpoints. Junctions resolve within a
561
552
  * run, not between runs. Each item carries its own
562
553
  * dimensions, `wallType` and `storey`, so a single call can build a whole
563
- * floor plate or several storeys at once. Per-curve `topProfiles` make raked
564
- * or gabled walls (see {@linkcode PluginWallTopProfile}). Validate-all-or-throw;
554
+ * floor plate or several storeys at once. Walls have one height: a non-null
555
+ * `topProfiles` entry is refused with `PRECONDITION_FAILED` (`details.itemIndex`
556
+ * names the item) and nothing is created. Validate-all-or-throw;
565
557
  * one command.
566
558
  *
567
559
  * @param items - One {@linkcode PluginCreateWallRunItem} per run to create
@@ -582,7 +574,6 @@ export abstract class PluginDesignCreateApi {
582
574
  * @examplePrompt Bulk create wall runs from these centerlines
583
575
  * @examplePrompt Create the walls for both storeys in a single undo step
584
576
  * @examplePrompt Turn these polylines into 200mm brick walls together
585
- * @examplePrompt Import these raked walls with their top profiles in one go
586
577
  *
587
578
  * @performance Bulk creator — the whole batch is ONE host round-trip and ONE undo
588
579
  * entry. Always prefer this over calling `design.create.walls` in a loop: build the
@@ -603,9 +594,6 @@ export abstract class PluginDesignCreateApi {
603
594
  * const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([
604
595
  * { profile: ground, height: 3, thickness: 0.2 },
605
596
  * { profile: upper, height: 3, storey: 2 },
606
- * // one gable wall: 3m at both ends, 5m ridge in the middle
607
- * { profile: upper, thickness: 0.2, storey: 3,
608
- * topProfiles: [[{ along: 0, height: 3 }, { along: 0.5, height: 5 }, { along: 1, height: 3 }]] },
609
597
  * ])
610
598
  * console.log(groundWalls.length, "walls on the ground floor")
611
599
  * ```
@@ -649,7 +637,7 @@ export abstract class PluginDesignCreateApi {
649
637
  */
650
638
  public abstract staircase(
651
639
  preset: PluginStaircasePreset,
652
- position: Vec3Handle,
640
+ position: Vec3Input,
653
641
  label?: string,
654
642
  structureId?: string,
655
643
  level?: string,
@@ -740,7 +728,7 @@ export abstract class PluginDesignCreateApi {
740
728
  spacingY: number,
741
729
  options?: {
742
730
  angle?: number
743
- center?: Vec3Handle
731
+ center?: Vec3Input
744
732
  } & PluginGridStyleOptions,
745
733
  ): PluginApiReturn<ComponentHandle>
746
734
 
@@ -895,7 +883,7 @@ export abstract class PluginDesignCreateApi {
895
883
  */
896
884
  public abstract furniture(
897
885
  catalogId: string,
898
- position: Vec3Handle,
886
+ position: Vec3Input,
899
887
  options?: { label?: string; createNewSourceMesh?: boolean },
900
888
  angleInDegrees?: number,
901
889
  ): PluginApiReturn<ComponentHandle>
@@ -1008,14 +996,14 @@ export abstract class PluginDesignCreateApi {
1008
996
  public abstract door(
1009
997
  familyId: string,
1010
998
  hostWall: ComponentHandle,
1011
- position: Vec3Handle,
999
+ position: Vec3Input,
1012
1000
  options?: {
1013
1001
  label?: string
1014
- hinge?: Vec3Handle
1002
+ hinge?: Vec3Input
1015
1003
  version?: number
1016
1004
  values?: Record<string, number | string>
1017
1005
  },
1018
- facing?: Vec3Handle,
1006
+ facing?: Vec3Input,
1019
1007
  ): PluginApiReturn<ComponentHandle>
1020
1008
 
1021
1009
  /**
@@ -1112,14 +1100,14 @@ export abstract class PluginDesignCreateApi {
1112
1100
  public abstract window(
1113
1101
  familyId: string,
1114
1102
  hostWall: ComponentHandle,
1115
- position: Vec3Handle,
1103
+ position: Vec3Input,
1116
1104
  options?: {
1117
1105
  label?: string
1118
- hinge?: Vec3Handle
1106
+ hinge?: Vec3Input
1119
1107
  version?: number
1120
1108
  values?: Record<string, number | string>
1121
1109
  },
1122
- facing?: Vec3Handle,
1110
+ facing?: Vec3Input,
1123
1111
  ): PluginApiReturn<ComponentHandle>
1124
1112
 
1125
1113
  /**
@@ -1446,7 +1434,7 @@ export abstract class PluginDesignCreateApi {
1446
1434
  */
1447
1435
  public abstract copy(
1448
1436
  components: ComponentHandle[],
1449
- displacement: Vec3Handle,
1437
+ displacement: Vec3Input,
1450
1438
  options?: { count?: number; mode?: PluginCopyMode },
1451
1439
  ): PluginApiReturn<ComponentHandle[]>
1452
1440
 
@@ -1669,7 +1657,7 @@ export const PluginDesignCreateSpaceArgs = z.object({
1669
1657
  contour: ContourHandle,
1670
1658
  height: z.number(),
1671
1659
  label: z.string().optional(),
1672
- position: Vec3Handle.optional(),
1660
+ position: Vec3Input.optional(),
1673
1661
  spaceType: PluginSpaceType.optional(),
1674
1662
  massType: PluginMassType.optional(),
1675
1663
  departmentId: PluginDepartmentId.optional(),
@@ -1700,7 +1688,7 @@ export const PluginDesignCreateMassArgs = z.object({
1700
1688
  contour: ContourHandle,
1701
1689
  height: z.number(),
1702
1690
  label: z.string().optional(),
1703
- position: Vec3Handle.optional(),
1691
+ position: Vec3Input.optional(),
1704
1692
  massType: PluginMassType.optional(),
1705
1693
  })
1706
1694
  export type PluginDesignCreateMassArgs = z.infer<
@@ -1767,7 +1755,7 @@ export type PluginDesignCreateSlabArgs = z.infer<
1767
1755
  export const PluginDesignCreateFloorArgs = z.object({
1768
1756
  contour: ContourHandle,
1769
1757
  thickness: z.number(),
1770
- position: Vec3Handle.optional(),
1758
+ position: Vec3Input.optional(),
1771
1759
  })
1772
1760
  export type PluginDesignCreateFloorArgs = z.infer<
1773
1761
  typeof PluginDesignCreateFloorArgs
@@ -1830,10 +1818,10 @@ export type PluginDesignCreateCeilingArgs = z.infer<
1830
1818
  * | `directionUp` | {@linkcode Vec3Handle}? | Up axis (default world up) |
1831
1819
  */
1832
1820
  export const PluginDesignCreateColumnArgs = z.object({
1833
- position: Vec3Handle,
1821
+ position: Vec3Input,
1834
1822
  crossSection: ContourHandle,
1835
1823
  height: z.number(),
1836
- directionUp: Vec3Handle.optional(),
1824
+ directionUp: Vec3Input.optional(),
1837
1825
  })
1838
1826
  export type PluginDesignCreateColumnArgs = z.infer<
1839
1827
  typeof PluginDesignCreateColumnArgs
@@ -1855,7 +1843,7 @@ export type PluginDesignCreateColumnArgs = z.infer<
1855
1843
  export const PluginDesignCreateBeamArgs = z.object({
1856
1844
  section: ContourHandle,
1857
1845
  length: z.number(),
1858
- direction: Vec3Handle.optional(),
1846
+ direction: Vec3Input.optional(),
1859
1847
  })
1860
1848
  export type PluginDesignCreateBeamArgs = z.infer<
1861
1849
  typeof PluginDesignCreateBeamArgs
@@ -1910,7 +1898,7 @@ export type PluginDesignCreateWallsArgs = z.infer<
1910
1898
  */
1911
1899
  export const PluginDesignCreateStaircaseArgs = z.object({
1912
1900
  preset: PluginStaircasePreset,
1913
- position: Vec3Handle,
1901
+ position: Vec3Input,
1914
1902
  label: z.string().optional(),
1915
1903
  structureId: z.string().optional(),
1916
1904
  level: z.string().optional(),
@@ -1937,7 +1925,7 @@ export type PluginDesignCreateStaircaseArgs = z.infer<
1937
1925
  */
1938
1926
  export const PluginDesignCreateFurnitureArgs = z.object({
1939
1927
  catalogId: z.string().min(1),
1940
- position: Vec3Handle,
1928
+ position: Vec3Input,
1941
1929
  label: z.string().optional(),
1942
1930
  createNewSourceMesh: z.boolean().optional(),
1943
1931
  angleInDegrees: z.number().optional(),
@@ -2195,7 +2183,7 @@ export type PluginCopyMode = z.infer<typeof PluginCopyMode>
2195
2183
  */
2196
2184
  export const PluginDesignCreateCopyArgs = z.object({
2197
2185
  components: z.array(ComponentHandle).min(1),
2198
- displacement: Vec3Handle,
2186
+ displacement: Vec3Input,
2199
2187
  count: z.number().int().positive().optional(),
2200
2188
  mode: PluginCopyMode.optional(),
2201
2189
  })
@@ -2228,7 +2216,7 @@ export const PluginCreateSpaceItem = z.object({
2228
2216
  contour: ContourHandle,
2229
2217
  height: z.number(),
2230
2218
  label: z.string().optional(),
2231
- position: Vec3Handle.optional(),
2219
+ position: Vec3Input.optional(),
2232
2220
  spaceType: PluginSpaceType.optional(),
2233
2221
  massType: PluginMassType.optional(),
2234
2222
  departmentId: PluginDepartmentId.optional(),
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod"
2
- import { ComponentHandle, Vec3Handle } from "../../../handles"
2
+ import { ComponentHandle, Vec3Input } from "../../../handles"
3
3
 
4
4
  /**
5
5
  * The shared field bag every hosted opening (door / window) carries — used by
@@ -17,9 +17,9 @@ import { ComponentHandle, Vec3Handle } from "../../../handles"
17
17
  * | `version` | `number`? | Exact family version; newest known by default |
18
18
  * | `values` | `Record<string, number \| string>`? | Authored instance parameters; numeric lengths use Snaptrude units |
19
19
  * | `hostWall` | {@linkcode ComponentHandle} | The wall to host the opening |
20
- * | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
21
- * | `facing` | {@linkcode Vec3Handle}? | World point on the side of the wall the opening swings open to (default engine-chosen) |
22
- * | `hinge` | {@linkcode Vec3Handle}? | World point near the hinged jamb; requires the recipe's hand parameter |
20
+ * | `position` | {@linkcode Vec3Input} | World point projected onto the wall (a vec3 handle or a plain `{ x, y, z }`) |
21
+ * | `facing` | {@linkcode Vec3Input}? | World point on the side of the wall the opening swings open to (default engine-chosen) |
22
+ * | `hinge` | {@linkcode Vec3Input}? | World point near the hinged jamb; requires the recipe's hand parameter |
23
23
  * | `label` | `string`? | Instance name (optional) |
24
24
  * | `width` | `number`? | Sets the declared width parameter, not the opening's evaluated envelope |
25
25
  * | `height` | `number`? | Sets the declared height parameter |
@@ -31,9 +31,9 @@ export const PluginOpeningBaseOptions = {
31
31
  .record(z.string(), z.union([z.number().finite(), z.string()]))
32
32
  .optional(),
33
33
  hostWall: ComponentHandle,
34
- position: Vec3Handle,
35
- facing: Vec3Handle.optional(),
36
- hinge: Vec3Handle.optional(),
34
+ position: Vec3Input,
35
+ facing: Vec3Input.optional(),
36
+ hinge: Vec3Input.optional(),
37
37
  label: z.string().optional(),
38
38
  width: z.number().finite().positive().optional(),
39
39
  height: z.number().finite().positive().optional(),
@@ -8,7 +8,7 @@ import { PluginDesignChangeResult } from "../lock"
8
8
  *
9
9
  * | Property | Type | Description |
10
10
  * |---|---|---|
11
- * | `components` | {@linkcode ComponentHandle}`[]` | Entities to delete. Unknown/forged handles reject the whole call (fail-fast). |
11
+ * | `components` | {@linkcode ComponentHandle}`[]` | Entities to delete. Handles that no longer resolve are skipped and returned as `missing`; the call rejects only when none resolve. |
12
12
  *
13
13
  * `.min(1)` is deliberately stricter than the shipped `PluginDesignLockArgs`
14
14
  * (which allows an empty array) — an empty delete is a caller error, not a no-op.
@@ -43,12 +43,19 @@ export abstract class PluginDesignDeleteApi {
43
43
  * entry, exactly as the editor's Delete key does — see `design.dimensions`. They are
44
44
  * NOT listed in `affected`, which reports component handles only.
45
45
  *
46
- * @param components - Entities to delete. Unknown/forged handles reject the whole call (fail-fast).
47
- * @returns The entities that were deleted, as {@linkcode ComponentHandle}`[]`
48
- * (echoed host-side from the resolved+deleted set — the engine returns no ids).
49
- * Deleted handles are **stale** afterwards: re-resolving one throws `HANDLE_INVALID`.
50
- * @throws If any supplied handle is unknown/forged (`HANDLE_INVALID`) — the whole
51
- * call rejects before anything is deleted (all-or-nothing resolution).
46
+ * @param components - Entities to delete. A handle that no longer resolves (already
47
+ * removed by an earlier edit — a door deleted with its wall, a wall replaced by an
48
+ * opening's re-cut) is skipped, not fatal.
49
+ * @returns `{ affected, cascaded?, missing?, rejected? }`: the entities you asked to delete
50
+ * (echoed host-side — the engine returns no ids); `cascaded`, the derived walls/floors/slabs
51
+ * the parametric graph removed with a deleted space; `missing`, handles that no longer
52
+ * resolved and were skipped; `rejected`, handles the engine accepted but left standing
53
+ * (delete them again, one at a time, or report them). Deleted handles are **stale**
54
+ * afterwards: re-resolving one throws `HANDLE_STALE`.
55
+ * @throws `HANDLE_INVALID` when NONE of the supplied handles resolve (nothing is deleted);
56
+ * hosts before Oct 2026 reject the whole call when any handle is gone. `OPERATION_FAILED`
57
+ * when the parametric engine rejects the deletion — the batch is rolled back.
58
+ * `HANDLE_STALE` for a handle the caller held that has since been retired.
52
59
  *
53
60
  * @examplePrompt Delete the selected objects
54
61
  * @examplePrompt Remove these walls from the model
@@ -5,6 +5,7 @@ import {
5
5
  DimensionHandle,
6
6
  Vec3Components,
7
7
  Vec3Handle,
8
+ Vec3Input,
8
9
  } from "../../handles"
9
10
 
10
11
  /**
@@ -94,8 +95,8 @@ export abstract class PluginDesignDimensionsApi {
94
95
  * ```
95
96
  */
96
97
  public abstract create(
97
- from: Vec3Handle,
98
- to: Vec3Handle,
98
+ from: Vec3Input,
99
+ to: Vec3Input,
99
100
  anchor: ComponentHandle,
100
101
  options?: { anchorTo?: ComponentHandle; offset?: number },
101
102
  ): PluginApiReturn<DimensionHandle>
@@ -362,8 +363,8 @@ export type PluginDimensionsChangeResult = z.infer<
362
363
  * TRANSPORT: positional args — validated host-side as this object.
363
364
  */
364
365
  export const PluginDesignDimensionsCreateArgs = z.object({
365
- from: Vec3Handle,
366
- to: Vec3Handle,
366
+ from: Vec3Input,
367
+ to: Vec3Input,
367
368
  anchor: ComponentHandle,
368
369
  anchorTo: ComponentHandle.optional(),
369
370
  offset: z.number().finite().optional(),
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod"
2
2
  import { PluginApiReturn } from "../../../types"
3
- import { ComponentHandle, Vec3Handle } from "../../../handles"
3
+ import { ComponentHandle, Vec3Input } from "../../../handles"
4
4
  import { OffsetSplitOutcome } from "../shared"
5
5
 
6
6
  /**
@@ -41,7 +41,7 @@ export abstract class PluginDesignEditApi {
41
41
  public abstract offsetSplit(
42
42
  component: ComponentHandle,
43
43
  offsetDistance: number,
44
- options?: { profilePickPoint?: Vec3Handle },
44
+ options?: { profilePickPoint?: Vec3Input },
45
45
  ): PluginApiReturn<OffsetSplitOutcome>
46
46
  }
47
47
 
@@ -49,6 +49,6 @@ export abstract class PluginDesignEditApi {
49
49
  export const PluginDesignOffsetSplitArgs = z.object({
50
50
  component: ComponentHandle,
51
51
  offsetDistance: z.number(),
52
- profilePickPoint: Vec3Handle.optional(),
52
+ profilePickPoint: Vec3Input.optional(),
53
53
  })
54
54
  export type PluginDesignOffsetSplitArgs = z.infer<typeof PluginDesignOffsetSplitArgs>
@@ -5,6 +5,7 @@ import {
5
5
  ComponentHandle,
6
6
  Vec3Components,
7
7
  Vec3Handle,
8
+ Vec3Input,
8
9
  } from "../../handles"
9
10
  import { NetworkFamilyContract } from "./networks"
10
11
 
@@ -1319,7 +1320,7 @@ export type PluginDesignFamilyDeleteArgs = z.infer<
1319
1320
  export const PluginDesignFamilyPlaceArgs = z.object({
1320
1321
  id: z.string().optional(),
1321
1322
  version: z.number().int().positive().optional(),
1322
- position: z.union([Vec3Handle, Vec3Components]).optional(),
1323
+ position: z.union([Vec3Input, Vec3Components]).optional(),
1323
1324
  rotation: z.number().optional(),
1324
1325
  values: z.record(z.string(), z.union([z.number(), z.string()])).optional(),
1325
1326
  storey: z.number().int().optional(),
@@ -15,6 +15,7 @@ import { PluginDesignEditApi } from "./edit"
15
15
  import { PluginDesignUpdateApi } from "./update"
16
16
  import { PluginDesignVisibilityApi } from "./visibility"
17
17
  import { PluginDesignDimensionsApi } from "./dimensions"
18
+ import { PluginDesignTextApi } from "./text"
18
19
  import { PluginDesignTypesApi } from "./types"
19
20
  import { PluginDesignFamilyApi } from "./family"
20
21
  import { PluginDesignGridsApi } from "./grids"
@@ -41,6 +42,7 @@ import {
41
42
  * - {@linkcode PluginDesignApi.delete} — hard entity removal
42
43
  * - {@linkcode PluginDesignApi.visibility} — hide / isolate / reveal entities
43
44
  * - {@linkcode PluginDesignApi.dimensions} — dimension lines (Measuring Tape): create / list / delete / hide
45
+ * - {@linkcode PluginDesignApi.text} — authored text and annotations (Text / Annotate tools): create / list / get / update / setLeader
44
46
  * - {@linkcode PluginDesignApi.types} — read-only building type / assembly reference
45
47
  * - {@linkcode PluginDesignApi.family} — author parametric families from a JSON spec
46
48
  * - {@linkcode PluginDesignApi.lock} / {@linkcode PluginDesignApi.unlock} / {@linkcode PluginDesignApi.isLocked} / {@linkcode PluginDesignApi.listLocked} — lock state (top-level design verbs, §2A.1)
@@ -79,6 +81,8 @@ export abstract class PluginDesignApi {
79
81
  public abstract visibility: PluginDesignVisibilityApi
80
82
  /** Dimension lines (Measuring Tape). See {@linkcode PluginDesignDimensionsApi}. */
81
83
  public abstract dimensions: PluginDesignDimensionsApi
84
+ /** Authored text and annotations (Text / Annotate tools). See {@linkcode PluginDesignTextApi}. */
85
+ public abstract text: PluginDesignTextApi
82
86
  /** Read-only building type / assembly reference. See {@linkcode PluginDesignTypesApi}. */
83
87
  public abstract types: PluginDesignTypesApi
84
88
  /** Author parametric families from a JSON spec. See {@linkcode PluginDesignFamilyApi}. */
@@ -296,6 +300,7 @@ export * from "./edit"
296
300
  export * from "./update"
297
301
  export * from "./visibility"
298
302
  export * from "./dimensions"
303
+ export * from "./text"
299
304
  export * from "./types"
300
305
  export * from "./family"
301
306
  export * from "./grids"
@@ -9,6 +9,12 @@ import { ComponentHandle } from "../../handles"
9
9
  */
10
10
  export const PluginDesignChangeResult = z.object({
11
11
  affected: z.array(ComponentHandle),
12
+ /** Derived BIM (walls/floors/slabs) the parametric engine removed with its host. Delete only. */
13
+ cascaded: z.array(ComponentHandle).optional(),
14
+ /** Handles that no longer resolved when the call ran and were skipped. Delete only. */
15
+ missing: z.array(ComponentHandle).optional(),
16
+ /** Handles the engine accepted but left standing; delete them again or report them. Delete only. */
17
+ rejected: z.array(ComponentHandle).optional(),
12
18
  })
13
19
  export type PluginDesignChangeResult = z.infer<typeof PluginDesignChangeResult>
14
20