@ifc-lite/create 4.0.0 → 5.1.0

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 (325) hide show
  1. package/README.md +34 -0
  2. package/dist/in-store/align-boxes.d.ts +38 -0
  3. package/dist/in-store/align-boxes.d.ts.map +1 -0
  4. package/dist/in-store/align-boxes.js +97 -0
  5. package/dist/in-store/align-boxes.js.map +1 -0
  6. package/dist/in-store/anchor.d.ts.map +1 -1
  7. package/dist/in-store/anchor.js +13 -2
  8. package/dist/in-store/anchor.js.map +1 -1
  9. package/dist/in-store/beam.d.ts.map +1 -1
  10. package/dist/in-store/beam.js +3 -10
  11. package/dist/in-store/beam.js.map +1 -1
  12. package/dist/in-store/copy-array.d.ts +17 -0
  13. package/dist/in-store/copy-array.d.ts.map +1 -0
  14. package/dist/in-store/copy-array.js +47 -0
  15. package/dist/in-store/copy-array.js.map +1 -0
  16. package/dist/in-store/copy-batch.d.ts +27 -0
  17. package/dist/in-store/copy-batch.d.ts.map +1 -0
  18. package/dist/in-store/copy-batch.js +101 -0
  19. package/dist/in-store/copy-batch.js.map +1 -0
  20. package/dist/in-store/copy-dependent-walk.d.ts +27 -0
  21. package/dist/in-store/copy-dependent-walk.d.ts.map +1 -0
  22. package/dist/in-store/copy-dependent-walk.js +61 -0
  23. package/dist/in-store/copy-dependent-walk.js.map +1 -0
  24. package/dist/in-store/copy-frame.d.ts +4 -3
  25. package/dist/in-store/copy-frame.d.ts.map +1 -1
  26. package/dist/in-store/copy-frame.js +14 -1
  27. package/dist/in-store/copy-frame.js.map +1 -1
  28. package/dist/in-store/copy-product.d.ts +0 -20
  29. package/dist/in-store/copy-product.d.ts.map +1 -1
  30. package/dist/in-store/copy-product.js +35 -35
  31. package/dist/in-store/copy-product.js.map +1 -1
  32. package/dist/in-store/edit/effective-mutation-view.d.ts +6 -0
  33. package/dist/in-store/edit/effective-mutation-view.d.ts.map +1 -0
  34. package/dist/in-store/edit/effective-mutation-view.js +45 -0
  35. package/dist/in-store/edit/effective-mutation-view.js.map +1 -0
  36. package/dist/in-store/edit/effective-storey.d.ts +13 -0
  37. package/dist/in-store/edit/effective-storey.d.ts.map +1 -0
  38. package/dist/in-store/edit/effective-storey.js +36 -0
  39. package/dist/in-store/edit/effective-storey.js.map +1 -0
  40. package/dist/in-store/edit/effective-storeys.d.ts +9 -0
  41. package/dist/in-store/edit/effective-storeys.d.ts.map +1 -0
  42. package/dist/in-store/edit/effective-storeys.js +16 -0
  43. package/dist/in-store/edit/effective-storeys.js.map +1 -0
  44. package/dist/in-store/edit/hosted-opening-refit.d.ts +29 -0
  45. package/dist/in-store/edit/hosted-opening-refit.d.ts.map +1 -0
  46. package/dist/in-store/edit/hosted-opening-refit.js +168 -0
  47. package/dist/in-store/edit/hosted-opening-refit.js.map +1 -0
  48. package/dist/in-store/edit/length-unit-scale.d.ts +24 -0
  49. package/dist/in-store/edit/length-unit-scale.d.ts.map +1 -0
  50. package/dist/in-store/edit/length-unit-scale.js +37 -0
  51. package/dist/in-store/edit/length-unit-scale.js.map +1 -0
  52. package/dist/in-store/edit/linear-element-edit.d.ts +131 -0
  53. package/dist/in-store/edit/linear-element-edit.d.ts.map +1 -0
  54. package/dist/in-store/edit/linear-element-edit.js +259 -0
  55. package/dist/in-store/edit/linear-element-edit.js.map +1 -0
  56. package/dist/in-store/edit/metadata-clone-effective.d.ts +5 -0
  57. package/dist/in-store/edit/metadata-clone-effective.d.ts.map +1 -0
  58. package/dist/in-store/edit/metadata-clone-effective.js +47 -0
  59. package/dist/in-store/edit/metadata-clone-effective.js.map +1 -0
  60. package/dist/in-store/edit/metadata-clone.d.ts +40 -0
  61. package/dist/in-store/edit/metadata-clone.d.ts.map +1 -0
  62. package/dist/in-store/edit/metadata-clone.js +107 -0
  63. package/dist/in-store/edit/metadata-clone.js.map +1 -0
  64. package/dist/in-store/edit/placement-core.d.ts +140 -0
  65. package/dist/in-store/edit/placement-core.d.ts.map +1 -0
  66. package/dist/in-store/edit/placement-core.js +317 -0
  67. package/dist/in-store/edit/placement-core.js.map +1 -0
  68. package/dist/in-store/edit/polygon-clip.d.ts +58 -0
  69. package/dist/in-store/edit/polygon-clip.d.ts.map +1 -0
  70. package/dist/in-store/edit/polygon-clip.js +153 -0
  71. package/dist/in-store/edit/polygon-clip.js.map +1 -0
  72. package/dist/in-store/edit/read-profile.d.ts +6 -0
  73. package/dist/in-store/edit/read-profile.d.ts.map +1 -0
  74. package/dist/in-store/edit/read-profile.js +95 -0
  75. package/dist/in-store/edit/read-profile.js.map +1 -0
  76. package/dist/in-store/edit/slab-edit-frame.d.ts +40 -0
  77. package/dist/in-store/edit/slab-edit-frame.d.ts.map +1 -0
  78. package/dist/in-store/edit/slab-edit-frame.js +146 -0
  79. package/dist/in-store/edit/slab-edit-frame.js.map +1 -0
  80. package/dist/in-store/edit/slab-edit.d.ts +112 -0
  81. package/dist/in-store/edit/slab-edit.d.ts.map +1 -0
  82. package/dist/in-store/edit/slab-edit.js +275 -0
  83. package/dist/in-store/edit/slab-edit.js.map +1 -0
  84. package/dist/in-store/edit/slab-opening-carry.d.ts +10 -0
  85. package/dist/in-store/edit/slab-opening-carry.d.ts.map +1 -0
  86. package/dist/in-store/edit/slab-opening-carry.js +65 -0
  87. package/dist/in-store/edit/slab-opening-carry.js.map +1 -0
  88. package/dist/in-store/edit/split-guid.d.ts +29 -0
  89. package/dist/in-store/edit/split-guid.d.ts.map +1 -0
  90. package/dist/in-store/edit/split-guid.js +64 -0
  91. package/dist/in-store/edit/split-guid.js.map +1 -0
  92. package/dist/in-store/edit/split-target.d.ts +90 -0
  93. package/dist/in-store/edit/split-target.d.ts.map +1 -0
  94. package/dist/in-store/edit/split-target.js +116 -0
  95. package/dist/in-store/edit/split-target.js.map +1 -0
  96. package/dist/in-store/edit/target.d.ts +8 -0
  97. package/dist/in-store/edit/target.d.ts.map +1 -0
  98. package/dist/in-store/edit/target.js +5 -0
  99. package/dist/in-store/edit/target.js.map +1 -0
  100. package/dist/in-store/edit/trim-extend-geometry.d.ts +99 -0
  101. package/dist/in-store/edit/trim-extend-geometry.d.ts.map +1 -0
  102. package/dist/in-store/edit/trim-extend-geometry.js +105 -0
  103. package/dist/in-store/edit/trim-extend-geometry.js.map +1 -0
  104. package/dist/in-store/edit/wall-axis-edit.d.ts +16 -0
  105. package/dist/in-store/edit/wall-axis-edit.d.ts.map +1 -0
  106. package/dist/in-store/edit/wall-axis-edit.js +40 -0
  107. package/dist/in-store/edit/wall-axis-edit.js.map +1 -0
  108. package/dist/in-store/edit/wall-edit.d.ts +157 -0
  109. package/dist/in-store/edit/wall-edit.d.ts.map +1 -0
  110. package/dist/in-store/edit/wall-edit.js +276 -0
  111. package/dist/in-store/edit/wall-edit.js.map +1 -0
  112. package/dist/in-store/edit/wall-hosted-cuts.d.ts +35 -0
  113. package/dist/in-store/edit/wall-hosted-cuts.d.ts.map +1 -0
  114. package/dist/in-store/edit/wall-hosted-cuts.js +27 -0
  115. package/dist/in-store/edit/wall-hosted-cuts.js.map +1 -0
  116. package/dist/in-store/edit/wall-opening-reassign.d.ts +18 -0
  117. package/dist/in-store/edit/wall-opening-reassign.d.ts.map +1 -0
  118. package/dist/in-store/edit/wall-opening-reassign.js +50 -0
  119. package/dist/in-store/edit/wall-opening-reassign.js.map +1 -0
  120. package/dist/in-store/element-align.d.ts +13 -0
  121. package/dist/in-store/element-align.d.ts.map +1 -0
  122. package/dist/in-store/element-align.js +90 -0
  123. package/dist/in-store/element-align.js.map +1 -0
  124. package/dist/in-store/element-replacement.d.ts +26 -0
  125. package/dist/in-store/element-replacement.d.ts.map +1 -0
  126. package/dist/in-store/element-replacement.js +68 -0
  127. package/dist/in-store/element-replacement.js.map +1 -0
  128. package/dist/in-store/element-size-edit.d.ts +40 -0
  129. package/dist/in-store/element-size-edit.d.ts.map +1 -0
  130. package/dist/in-store/element-size-edit.js +103 -0
  131. package/dist/in-store/element-size-edit.js.map +1 -0
  132. package/dist/in-store/element-split-axis.d.ts +6 -0
  133. package/dist/in-store/element-split-axis.d.ts.map +1 -0
  134. package/dist/in-store/element-split-axis.js +87 -0
  135. package/dist/in-store/element-split-axis.js.map +1 -0
  136. package/dist/in-store/element-split-joined.d.ts +13 -0
  137. package/dist/in-store/element-split-joined.d.ts.map +1 -0
  138. package/dist/in-store/element-split-joined.js +74 -0
  139. package/dist/in-store/element-split-joined.js.map +1 -0
  140. package/dist/in-store/element-split-placement.d.ts +19 -0
  141. package/dist/in-store/element-split-placement.d.ts.map +1 -0
  142. package/dist/in-store/element-split-placement.js +48 -0
  143. package/dist/in-store/element-split-placement.js.map +1 -0
  144. package/dist/in-store/element-split-slab.d.ts +19 -0
  145. package/dist/in-store/element-split-slab.d.ts.map +1 -0
  146. package/dist/in-store/element-split-slab.js +86 -0
  147. package/dist/in-store/element-split-slab.js.map +1 -0
  148. package/dist/in-store/element-split.d.ts +49 -0
  149. package/dist/in-store/element-split.d.ts.map +1 -0
  150. package/dist/in-store/element-split.js +52 -0
  151. package/dist/in-store/element-split.js.map +1 -0
  152. package/dist/in-store/element-transform-edit.d.ts +33 -0
  153. package/dist/in-store/element-transform-edit.d.ts.map +1 -0
  154. package/dist/in-store/element-transform-edit.js +97 -0
  155. package/dist/in-store/element-transform-edit.js.map +1 -0
  156. package/dist/in-store/element-transform-frames.d.ts +58 -0
  157. package/dist/in-store/element-transform-frames.d.ts.map +1 -0
  158. package/dist/in-store/element-transform-frames.js +110 -0
  159. package/dist/in-store/element-transform-frames.js.map +1 -0
  160. package/dist/in-store/element-transform-joins.d.ts +4 -0
  161. package/dist/in-store/element-transform-joins.d.ts.map +1 -0
  162. package/dist/in-store/element-transform-joins.js +62 -0
  163. package/dist/in-store/element-transform-joins.js.map +1 -0
  164. package/dist/in-store/element-transform-plan.d.ts +38 -0
  165. package/dist/in-store/element-transform-plan.d.ts.map +1 -0
  166. package/dist/in-store/element-transform-plan.js +115 -0
  167. package/dist/in-store/element-transform-plan.js.map +1 -0
  168. package/dist/in-store/element-trim-extend.d.ts +25 -0
  169. package/dist/in-store/element-trim-extend.d.ts.map +1 -0
  170. package/dist/in-store/element-trim-extend.js +97 -0
  171. package/dist/in-store/element-trim-extend.js.map +1 -0
  172. package/dist/in-store/extract-grids.d.ts +7 -17
  173. package/dist/in-store/extract-grids.d.ts.map +1 -1
  174. package/dist/in-store/extract-grids.js +11 -2
  175. package/dist/in-store/extract-grids.js.map +1 -1
  176. package/dist/in-store/grid-column.d.ts +23 -0
  177. package/dist/in-store/grid-column.d.ts.map +1 -0
  178. package/dist/in-store/grid-column.js +73 -0
  179. package/dist/in-store/grid-column.js.map +1 -0
  180. package/dist/in-store/grid-intersection-read.d.ts +10 -0
  181. package/dist/in-store/grid-intersection-read.d.ts.map +1 -0
  182. package/dist/in-store/grid-intersection-read.js +45 -0
  183. package/dist/in-store/grid-intersection-read.js.map +1 -0
  184. package/dist/in-store/grid.d.ts +7 -1
  185. package/dist/in-store/grid.d.ts.map +1 -1
  186. package/dist/in-store/grid.js +12 -2
  187. package/dist/in-store/grid.js.map +1 -1
  188. package/dist/in-store/group-evidence.d.ts +49 -0
  189. package/dist/in-store/group-evidence.d.ts.map +1 -0
  190. package/dist/in-store/group-evidence.js +111 -0
  191. package/dist/in-store/group-evidence.js.map +1 -0
  192. package/dist/in-store/group-graph.d.ts +51 -0
  193. package/dist/in-store/group-graph.d.ts.map +1 -0
  194. package/dist/in-store/group-graph.js +213 -0
  195. package/dist/in-store/group-graph.js.map +1 -0
  196. package/dist/in-store/group.d.ts +34 -0
  197. package/dist/in-store/group.d.ts.map +1 -0
  198. package/dist/in-store/group.js +181 -0
  199. package/dist/in-store/group.js.map +1 -0
  200. package/dist/in-store/host-geometry-frame.d.ts +5 -1
  201. package/dist/in-store/host-geometry-frame.d.ts.map +1 -1
  202. package/dist/in-store/host-geometry-frame.js +46 -2
  203. package/dist/in-store/host-geometry-frame.js.map +1 -1
  204. package/dist/in-store/index.d.ts +7 -0
  205. package/dist/in-store/index.d.ts.map +1 -1
  206. package/dist/in-store/index.js +7 -0
  207. package/dist/in-store/index.js.map +1 -1
  208. package/dist/in-store/linear-profile-frame.d.ts +10 -0
  209. package/dist/in-store/linear-profile-frame.d.ts.map +1 -0
  210. package/dist/in-store/linear-profile-frame.js +17 -0
  211. package/dist/in-store/linear-profile-frame.js.map +1 -0
  212. package/dist/in-store/material.d.ts.map +1 -1
  213. package/dist/in-store/material.js +17 -6
  214. package/dist/in-store/material.js.map +1 -1
  215. package/dist/in-store/member.d.ts.map +1 -1
  216. package/dist/in-store/member.js +3 -7
  217. package/dist/in-store/member.js.map +1 -1
  218. package/dist/in-store/ordinary-element.d.ts +47 -0
  219. package/dist/in-store/ordinary-element.d.ts.map +1 -0
  220. package/dist/in-store/ordinary-element.js +38 -0
  221. package/dist/in-store/ordinary-element.js.map +1 -0
  222. package/dist/in-store/placement-frame.d.ts +6 -1
  223. package/dist/in-store/placement-frame.d.ts.map +1 -1
  224. package/dist/in-store/placement-frame.js +5 -1
  225. package/dist/in-store/placement-frame.js.map +1 -1
  226. package/dist/in-store/resolve-anchor.d.ts +3 -2
  227. package/dist/in-store/resolve-anchor.d.ts.map +1 -1
  228. package/dist/in-store/resolve-anchor.js +7 -5
  229. package/dist/in-store/resolve-anchor.js.map +1 -1
  230. package/dist/in-store/resolve-relations.d.ts +3 -1
  231. package/dist/in-store/resolve-relations.d.ts.map +1 -1
  232. package/dist/in-store/resolve-relations.js +8 -3
  233. package/dist/in-store/resolve-relations.js.map +1 -1
  234. package/dist/in-store/room-candidates.d.ts +58 -0
  235. package/dist/in-store/room-candidates.d.ts.map +1 -0
  236. package/dist/in-store/room-candidates.js +135 -0
  237. package/dist/in-store/room-candidates.js.map +1 -0
  238. package/dist/in-store/room-creation-plan.d.ts +16 -0
  239. package/dist/in-store/room-creation-plan.d.ts.map +1 -0
  240. package/dist/in-store/room-creation-plan.js +28 -0
  241. package/dist/in-store/room-creation-plan.js.map +1 -0
  242. package/dist/in-store/room-floor-height.d.ts +24 -0
  243. package/dist/in-store/room-floor-height.d.ts.map +1 -0
  244. package/dist/in-store/room-floor-height.js +32 -0
  245. package/dist/in-store/room-floor-height.js.map +1 -0
  246. package/dist/in-store/room-footprint-native.d.ts +19 -0
  247. package/dist/in-store/room-footprint-native.d.ts.map +1 -0
  248. package/dist/in-store/room-footprint-native.js +117 -0
  249. package/dist/in-store/room-footprint-native.js.map +1 -0
  250. package/dist/in-store/room-layout-cache.d.ts +23 -0
  251. package/dist/in-store/room-layout-cache.d.ts.map +1 -0
  252. package/dist/in-store/room-layout-cache.js +84 -0
  253. package/dist/in-store/room-layout-cache.js.map +1 -0
  254. package/dist/in-store/room-layout-core.d.ts +68 -0
  255. package/dist/in-store/room-layout-core.d.ts.map +1 -0
  256. package/dist/in-store/room-layout-core.js +153 -0
  257. package/dist/in-store/room-layout-core.js.map +1 -0
  258. package/dist/in-store/room-population.d.ts +5 -0
  259. package/dist/in-store/room-population.d.ts.map +1 -0
  260. package/dist/in-store/room-population.js +28 -0
  261. package/dist/in-store/room-population.js.map +1 -0
  262. package/dist/in-store/room-space-meshes.d.ts +15 -0
  263. package/dist/in-store/room-space-meshes.d.ts.map +1 -0
  264. package/dist/in-store/room-space-meshes.js +38 -0
  265. package/dist/in-store/room-space-meshes.js.map +1 -0
  266. package/dist/in-store/room-store.d.ts +55 -0
  267. package/dist/in-store/room-store.d.ts.map +1 -0
  268. package/dist/in-store/room-store.js +173 -0
  269. package/dist/in-store/room-store.js.map +1 -0
  270. package/dist/in-store/room-storey-elevation.d.ts +5 -0
  271. package/dist/in-store/room-storey-elevation.d.ts.map +1 -0
  272. package/dist/in-store/room-storey-elevation.js +42 -0
  273. package/dist/in-store/room-storey-elevation.js.map +1 -0
  274. package/dist/in-store/room-storey-frame.d.ts +47 -0
  275. package/dist/in-store/room-storey-frame.d.ts.map +1 -0
  276. package/dist/in-store/room-storey-frame.js +48 -0
  277. package/dist/in-store/room-storey-frame.js.map +1 -0
  278. package/dist/in-store/room-wall-rects.d.ts +117 -0
  279. package/dist/in-store/room-wall-rects.d.ts.map +1 -0
  280. package/dist/in-store/room-wall-rects.js +157 -0
  281. package/dist/in-store/room-wall-rects.js.map +1 -0
  282. package/dist/in-store/schema-attributes.d.ts +3 -3
  283. package/dist/in-store/schema-attributes.d.ts.map +1 -1
  284. package/dist/in-store/schema-attributes.js +9 -7
  285. package/dist/in-store/schema-attributes.js.map +1 -1
  286. package/dist/in-store/slab.d.ts.map +1 -1
  287. package/dist/in-store/slab.js +1 -4
  288. package/dist/in-store/slab.js.map +1 -1
  289. package/dist/in-store/stair-removal.d.ts +17 -0
  290. package/dist/in-store/stair-removal.d.ts.map +1 -0
  291. package/dist/in-store/stair-removal.js +134 -0
  292. package/dist/in-store/stair-removal.js.map +1 -0
  293. package/dist/in-store/storey-plan-frame.d.ts +2 -1
  294. package/dist/in-store/storey-plan-frame.d.ts.map +1 -1
  295. package/dist/in-store/storey-plan-frame.js +20 -11
  296. package/dist/in-store/storey-plan-frame.js.map +1 -1
  297. package/dist/in-store/storey-reassignment-plan.d.ts +53 -0
  298. package/dist/in-store/storey-reassignment-plan.d.ts.map +1 -0
  299. package/dist/in-store/storey-reassignment-plan.js +237 -0
  300. package/dist/in-store/storey-reassignment-plan.js.map +1 -0
  301. package/dist/in-store/storey-reassignment.d.ts +8 -0
  302. package/dist/in-store/storey-reassignment.d.ts.map +1 -0
  303. package/dist/in-store/storey-reassignment.js +52 -0
  304. package/dist/in-store/storey-reassignment.js.map +1 -0
  305. package/dist/in-store/trim-extend-plan.d.ts +27 -0
  306. package/dist/in-store/trim-extend-plan.d.ts.map +1 -0
  307. package/dist/in-store/trim-extend-plan.js +49 -0
  308. package/dist/in-store/trim-extend-plan.js.map +1 -0
  309. package/dist/in-store/wall-join-edit.d.ts +0 -17
  310. package/dist/in-store/wall-join-edit.d.ts.map +1 -1
  311. package/dist/in-store/wall-join-edit.js +41 -7
  312. package/dist/in-store/wall-join-edit.js.map +1 -1
  313. package/dist/in-store/wall-section-edit.d.ts +16 -0
  314. package/dist/in-store/wall-section-edit.d.ts.map +1 -0
  315. package/dist/in-store/wall-section-edit.js +75 -0
  316. package/dist/in-store/wall-section-edit.js.map +1 -0
  317. package/dist/in-store/wall-size-edit.d.ts +29 -0
  318. package/dist/in-store/wall-size-edit.d.ts.map +1 -0
  319. package/dist/in-store/wall-size-edit.js +65 -0
  320. package/dist/in-store/wall-size-edit.js.map +1 -0
  321. package/dist/index.d.ts +24 -0
  322. package/dist/index.d.ts.map +1 -1
  323. package/dist/index.js +23 -0
  324. package/dist/index.js.map +1 -1
  325. package/package.json +8 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear-element-edit.js","sourceRoot":"","sources":["../../../src/in-store/edit/linear-element-edit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2B/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,CAAC,SAAS;AAUxD,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAEjF,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,QAAQ,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QAC/B,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AA2CD,MAAM,GAAG,GAAG,IAAI,CAAC;AAEjB,SAAS,OAAO,CAAC,K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I,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAmB,EACnB,KAA6B,EAC7B,QAAgB;IAEhB,iEAAiE;IACjE,MAAM,CAAC,sBAAsB,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAC5F,CAAC;AAED,iEAAiE;AACjE,mEAAmE;AACnE,uDAAuD;AACvD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { MutablePropertyView, StoreEditor } from '@ifc-lite/mutations';
2
+ /** Atomic split/copy batches share one draft editor; the budget therefore covers
3
+ * the complete operation, including assembly parts and repeated source copies. */
4
+ export declare function cloneEffectiveMetadata(view: MutablePropertyView, editor: StoreEditor, source: number, targets: number[]): void;
5
+ //# sourceMappingURL=metadata-clone-effective.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-clone-effective.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone-effective.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAS5E;kFACkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAgC9H"}
@@ -0,0 +1,47 @@
1
+ /** #7251: virtual and edited source sets have effective values that raw
2
+ * relationship sharing cannot carry. Use the same overlay API after memberships,
3
+ * preserving the native builder's same-name metadata priority. Current edits
4
+ * are authoritative; append-only history must never resurrect an undone set. */
5
+ const writesByEditor = new WeakMap();
6
+ const MAX_EFFECTIVE_METADATA_WRITES = 10000;
7
+ /** Atomic split/copy batches share one draft editor; the budget therefore covers
8
+ * the complete operation, including assembly parts and repeated source copies. */
9
+ export function cloneEffectiveMetadata(view, editor, source, targets) {
10
+ if (!view.hasChanges(source))
11
+ return;
12
+ const changes = view.getEffectiveChanges().filter(row => row.entityId === source);
13
+ const propertyNames = new Set(changes.filter(row => row.kind === 'pset-added' || row.kind === 'property').map(row => row.setName));
14
+ const quantityNames = new Set(changes.filter(row => row.kind === 'qset-added' || row.kind === 'quantity').map(row => row.setName));
15
+ const properties = view.getForEntity(source).filter(set => propertyNames.has(set.name));
16
+ const quantities = view.getQuantitiesForEntity(source).filter(set => quantityNames.has(set.name));
17
+ const writes = targets.length * (properties.reduce((sum, set) => sum + 1 + set.properties.length
18
+ + set.properties.filter(property => property.dataType !== undefined).length, 0)
19
+ + quantities.reduce((sum, set) => sum + 1 + set.quantities.length, 0));
20
+ const total = (writesByEditor.get(editor) ?? 0) + writes;
21
+ if (total > MAX_EFFECTIVE_METADATA_WRITES)
22
+ throw new Error('Effective metadata cloning exceeds 10000 writes in one operation; no metadata is silently omitted');
23
+ writesByEditor.set(editor, total);
24
+ for (const target of targets) {
25
+ const existingProperties = new Set(view.getForEntity(target).map(set => set.name));
26
+ const existingQuantities = new Set(view.getQuantitiesForEntity(target).map(set => set.name));
27
+ for (const set of properties) {
28
+ if (existingProperties.has(set.name))
29
+ continue;
30
+ view.createPropertySet(target, set.name, set.properties.map(property => ({ name: property.name, value: property.value, type: property.type, unit: property.unit })));
31
+ // The constructor preserves empty/null members; typed values also retain
32
+ // their native declared data type through the normal mutation writer.
33
+ for (const property of set.properties)
34
+ if (property.dataType !== undefined) {
35
+ view.setProperty(target, set.name, property.name, property.value, property.type, property.unit, false, property.dataType);
36
+ }
37
+ existingProperties.add(set.name);
38
+ }
39
+ for (const set of quantities) {
40
+ if (existingQuantities.has(set.name))
41
+ continue;
42
+ view.createQuantitySet(target, set.name, set.quantities.map(quantity => ({ name: quantity.name, value: quantity.value, quantityType: quantity.type, unit: quantity.unit })));
43
+ existingQuantities.add(set.name);
44
+ }
45
+ }
46
+ }
47
+ //# sourceMappingURL=metadata-clone-effective.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-clone-effective.js","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone-effective.ts"],"names":[],"mappings":"AAKA;;;gFAGgF;AAChF,MAAM,cAAc,GAAG,IAAI,OAAO,EAAuB,CAAC;AAC1D,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAE5C;kFACkF;AAClF,MAAM,UAAU,sBAAsB,CAAC,IAAyB,EAAE,MAAmB,EAAE,MAAc,EAAE,OAAiB;IACtH,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;IAClF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACnI,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACnI,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI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,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC7K,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Carry an element's Pset / Qto / classification / material / type
3
+ * relationships from a source IfcProduct onto one or more target
4
+ * products. Used when an authoring operation produces siblings of
5
+ * a source entity (split, duplicate, etc.) — both halves of a split
6
+ * wall should keep the source's FireRating, etc.
7
+ *
8
+ * Strategy: append the target id(s) to each relationship's
9
+ * `RelatedObjects` list rather than cloning the relationship entity
10
+ * itself. Cheaper, less overlay growth, and the IFC schema allows
11
+ * many objects to share a single rel. Downstream tooling (IDS, Pset
12
+ * dumps, exports) reads each rel's RelatedObjects list, so the
13
+ * targets become first-class members.
14
+ *
15
+ * The relationships we touch:
16
+ *
17
+ * IfcRelDefinesByProperties — Psets / Qtos (the big one)
18
+ * IfcRelDefinesByType — occurrence → type binding
19
+ * IfcRelAssociatesClassification
20
+ * IfcRelAssociatesMaterial
21
+ * IfcRelContainedInSpatialStructure — storey containment
22
+ * IfcRelAggregates / IfcRelNests — element assemblies
23
+ *
24
+ * Containment is handled separately by callers that already use
25
+ * `addWallToStore` / `addSlabToStore` etc. (those builders emit a
26
+ * fresh `IfcRelContainedInSpatialStructure` for the new entity), so
27
+ * this helper deliberately skips it.
28
+ *
29
+ * Returns the number of relationships touched so callers can log
30
+ * useful telemetry. Returns 0 silently when the source has no
31
+ * relationships — that's a valid case.
32
+ */
33
+ import type { IfcDataStore } from '@ifc-lite/parser';
34
+ import { type MutablePropertyView, type StoreEditor } from '@ifc-lite/mutations';
35
+ export interface CloneMetadataResult {
36
+ /** Number of relationships that gained at least one target. */
37
+ relationshipsTouched: number;
38
+ }
39
+ export declare function cloneElementMetadata(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, sourceExpressId: number, targetExpressIds: number[]): CloneMetadataResult;
40
+ //# sourceMappingURL=metadata-clone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-clone.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAqD,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAiBpI,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AASD,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,MAAM,EAAE,GACzB,mBAAmB,CAqErB"}
@@ -0,0 +1,107 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
5
+ import { readAttributes } from './placement-core.js';
6
+ import { asRef, refList } from '../style-entity-reader.js';
7
+ import { cloneEffectiveMetadata } from './metadata-clone-effective.js';
8
+ import { refToken } from '../copy-frame.js';
9
+ /** Relationship entity types we touch (case follows STEP storage form). */
10
+ const RELATIONSHIPS_TO_CLONE = [
11
+ // [type, related-objects-attribute-index, related-object-is-list-of-refs?]
12
+ ['IFCRELDEFINESBYPROPERTIES', 4],
13
+ ['IFCRELDEFINESBYTYPE', 4],
14
+ ['IFCRELASSOCIATESCLASSIFICATION', 4],
15
+ ['IFCRELASSOCIATESMATERIAL', 4],
16
+ ['IFCRELAGGREGATES', 5],
17
+ ['IFCRELNESTS', 5],
18
+ ];
19
+ /** These schema-known relationship slots are lists of entity references.
20
+ * Parsed numeric IDs must become explicit reference tokens for overlay writes;
21
+ * retaining numeric literals would disconnect every member on STEP export. */
22
+ function appendTargetsToList(raw, targets) {
23
+ return [...refList(raw), ...targets].map(refToken);
24
+ }
25
+ export function cloneElementMetadata(dataStore, view, editor, sourceExpressId, targetExpressIds) {
26
+ if (targetExpressIds.length === 0)
27
+ return { relationshipsTouched: 0 };
28
+ // Dedupe caller-side input so a target listed twice doesn't
29
+ // produce two appends. The per-rel `currentRelated.includes`
30
+ // guard below would catch it on the second pass, but on the
31
+ // first pass both copies would land in the new list.
32
+ const uniqueTargets = Array.from(new Set(targetExpressIds));
33
+ const notSharedProperties = new Set(), notSharedQuantities = new Set();
34
+ if (view.hasChanges(sourceExpressId))
35
+ for (const change of view.getEffectiveChanges()) {
36
+ if (change.entityId !== sourceExpressId || change.setName === undefined)
37
+ continue;
38
+ if (change.kind === 'pset-deleted')
39
+ notSharedProperties.add(change.setName);
40
+ if (change.kind === 'qset-deleted')
41
+ notSharedQuantities.add(change.setName);
42
+ // Edited source values are copied through the effective mutation view
43
+ // below, not by sharing their stale source definition.
44
+ if (change.kind === 'property')
45
+ notSharedProperties.add(change.setName);
46
+ if (change.kind === 'quantity')
47
+ notSharedQuantities.add(change.setName);
48
+ }
49
+ const propertyNames = new Map(), quantityNames = new Map();
50
+ const namesFor = (id, quantity) => {
51
+ const cache = quantity ? quantityNames : propertyNames;
52
+ let names = cache.get(id);
53
+ if (!names) {
54
+ const sets = quantity
55
+ ? view.getQuantitiesForEntity(id)
56
+ : view.getForEntity(id);
57
+ names = new Set(sets.map(set => set.name));
58
+ cache.set(id, names);
59
+ }
60
+ return names;
61
+ };
62
+ let touched = 0;
63
+ for (const [type, index] of RELATIONSHIPS_TO_CLONE) {
64
+ for (const { expressId: relId } of iterateEffectiveEntityIds(dataStore, view, [type])) {
65
+ const attrs = readAttributes(dataStore, view, editor, relId);
66
+ if (!attrs)
67
+ continue;
68
+ const currentRelated = refList(attrs[index]);
69
+ if (!currentRelated.includes(sourceExpressId))
70
+ continue;
71
+ // Skip targets that are already in the list — avoids duplicates
72
+ // when this is called twice for the same operation (idempotent).
73
+ const definitionId = type === 'IFCRELDEFINESBYPROPERTIES' ? asRef(attrs[5]) : null;
74
+ const definitionType = definitionId === null ? null : editor.getEntityType(definitionId)?.toUpperCase();
75
+ const namedSet = definitionType === 'IFCPROPERTYSET' || definitionType === 'IFCELEMENTQUANTITY';
76
+ const readName = namedSet && definitionId !== null ? readAttributes(dataStore, view, editor, definitionId)?.[2] : null;
77
+ const definitionName = typeof readName === 'string' ? readName : null;
78
+ // Logical set deletion is applied during STEP export rather than by
79
+ // editing the source relationship. Sharing that raw membership would
80
+ // restore the deleted set on the new piece.
81
+ if (definitionName !== null && (definitionType === 'IFCELEMENTQUANTITY'
82
+ ? notSharedQuantities : notSharedProperties).has(definitionName))
83
+ continue;
84
+ // A builder may already have authored canonical metadata for this piece.
85
+ // Retain that same-name set (especially its newly measured quantities),
86
+ // and share only distinct imported sets. The source itself is untouched.
87
+ const names = definitionName !== null
88
+ ? (id) => namesFor(id, definitionType === 'IFCELEMENTQUANTITY') : null;
89
+ const additions = uniqueTargets.filter(id => {
90
+ if (currentRelated.includes(id))
91
+ return false;
92
+ return names === null || definitionName === null || !names(id).has(definitionName);
93
+ });
94
+ if (additions.length === 0)
95
+ continue;
96
+ const newList = appendTargetsToList(attrs[index], additions);
97
+ editor.setPositionalAttribute(relId, index, newList);
98
+ if (names && definitionName !== null)
99
+ for (const id of additions)
100
+ names(id).add(definitionName);
101
+ touched++;
102
+ }
103
+ }
104
+ cloneEffectiveMetadata(view, editor, sourceExpressId, uniqueTargets);
105
+ return { relationshipsTouched: touched };
106
+ }
107
+ //# sourceMappingURL=metadata-clone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-clone.js","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone.ts"],"names":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,CAAC;IACH,CAAC;IACD,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;IACrE,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Core placement-chain reader + generic IfcProduct edits.
3
+ *
4
+ * Walks the standard product placement chain
5
+ *
6
+ * IfcProduct → ObjectPlacement → IfcLocalPlacement
7
+ * → RelativePlacement → IfcAxis2Placement3D
8
+ * → Location → IfcCartesianPoint → Coordinates [x, y, z]
9
+ *
10
+ * Reads honour the `StoreEditor` overlay (overlay-only entities,
11
+ * named/positional mutations and current retypes on top of source-buffer entities for placement owners).
12
+ * Writes go through `setPositionalAttribute` so they stack with
13
+ * other overlay edits and participate in the standard undo path.
14
+ *
15
+ * Wall-specific edits live in `wall-edit.ts`; this module stays
16
+ * generic so file size + cognitive scope stay manageable.
17
+ */
18
+ import { type IfcDataStore } from '@ifc-lite/parser';
19
+ import type { MutablePropertyView, StoreEditor } from '@ifc-lite/mutations';
20
+ /** Synchronous source decoding for headless edits. The viewer may override
21
+ * this reader at boot; overlay reads never require a source buffer. */
22
+ export type SourceAttrsReader = (dataStore: IfcDataStore, expressId: number) => unknown[] | null;
23
+ /**
24
+ * Override the parser-backed source reader at app boot.
25
+ * Pass `null` to disable source reads (used by tests).
26
+ */
27
+ export declare function setSourceAttrsReader(reader: SourceAttrsReader | null): void;
28
+ type EntityAttrs = unknown[];
29
+ /** #7315: only native placement owners use current named/retyped fields.
30
+ * The general body/profile reader retains its existing positional contract. */
31
+ export declare function readPlacementAttributes(dataStore: IfcDataStore, view: MutablePropertyView, editor: Pick<StoreEditor, 'getNewEntity'> & Partial<Pick<StoreEditor, 'getEntityType'>>, expressId: number): EntityAttrs | null;
32
+ /**
33
+ * Read the effective attribute list for an express id. Overlay-only
34
+ * entities come from the StoreEditor; source entities come from the
35
+ * original buffer. Positional-mutation overrides are layered on top so
36
+ * a previously-translated point reads back its mutated coords.
37
+ */
38
+ export declare function readAttributes(dataStore: IfcDataStore, view: MutablePropertyView,
39
+ /** Only its overlay lookup is read, so the view itself will do. */
40
+ editor: Pick<StoreEditor, 'getNewEntity'>, expressId: number): EntityAttrs | null;
41
+ /**
42
+ * References take two forms in our attribute graph:
43
+ * - number (the parser normalises `#123` → 123 when reading source)
44
+ * - string `#123` (overlay entities created via `editor.addEntity`
45
+ * carry the raw `#X` form straight through)
46
+ * Treat both as valid so the chain walker works for source-buffer
47
+ * AND overlay-only entities — it's the same conceptual reference.
48
+ */
49
+ export declare function asExpressIdRef(value: unknown): number | null;
50
+ export declare function asCoordinateTriple(value: unknown): [number, number, number] | null;
51
+ export declare function asDirectionRatios(value: unknown): [number, number, number] | null;
52
+ export interface PlacementChain {
53
+ /** IfcProduct.ObjectPlacement target (IfcLocalPlacement express id). */
54
+ localPlacementId: number;
55
+ /** IfcLocalPlacement.RelativePlacement target (IfcAxis2Placement3D express id). */
56
+ axisPlacementId: number;
57
+ /** IfcAxis2Placement3D.Location target (IfcCartesianPoint express id). */
58
+ cartesianPointId: number;
59
+ /** Current coordinates on the IfcCartesianPoint (storey-local, IFC Z-up). */
60
+ coordinates: [number, number, number];
61
+ }
62
+ /**
63
+ * Resolve the full placement chain for an IfcProduct. Returns `null`
64
+ * if any link is missing or has the wrong shape — callers should treat
65
+ * this as "this entity's placement isn't directly translatable" and
66
+ * surface a clear message rather than crashing.
67
+ *
68
+ * Indices follow the IfcProduct attribute order:
69
+ * [0] GlobalId · [1] OwnerHistory · [2] Name · [3] Description
70
+ * [4] ObjectType · [5] ObjectPlacement · [6] Representation · ...
71
+ *
72
+ * For non-product entities (e.g. profiles, points themselves) attrs[5]
73
+ * either doesn't exist or isn't a placement reference, so we bail.
74
+ */
75
+ export declare function resolvePlacementChain(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number): PlacementChain | null;
76
+ /** Pure preview shared by atomic preflight and the placement writer. */
77
+ export declare function translatedCoordinates(coordinates: readonly number[], delta: readonly number[]): [number, number, number] | null;
78
+ export type TranslateResult = {
79
+ ok: true;
80
+ oldCoordinates: [number, number, number];
81
+ newCoordinates: [number, number, number];
82
+ } | {
83
+ ok: false;
84
+ reason: string;
85
+ };
86
+ /**
87
+ * Translate an IfcProduct by `delta` (storey-local IFC Z-up). Reads
88
+ * the current coordinates from the chain, adds the delta, writes back
89
+ * via `setPositionalAttribute`. Caller is responsible for batching
90
+ * undo (the upstream `setPositionalAttribute` action already pushes a
91
+ * single mutation onto the model's undo stack).
92
+ */
93
+ export declare function translateProduct(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number, delta: [number, number, number]): TranslateResult;
94
+ /**
95
+ * Set the entity's position to an absolute storey-local coordinate.
96
+ * Convenience over `translateProduct` when the caller has a target
97
+ * (e.g. a numeric form bound to current coordinates).
98
+ */
99
+ export declare function setProductPosition(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number, position: [number, number, number]): TranslateResult;
100
+ /**
101
+ * Snapshot of the placement's IfcAxis2Placement3D rotation.
102
+ * `refDirectionId === null` means the slot is implicit (STEP `$`) —
103
+ * the default direction `[1, 0, 0]` is reported, but callers that
104
+ * want to rotate must refuse this case (no IfcDirection to write to
105
+ * without orphaning one on undo).
106
+ */
107
+ export interface RotationState {
108
+ axisPlacementId: number;
109
+ refDirectionId: number | null;
110
+ refDirection: [number, number, number];
111
+ /** Current yaw about Z (rad). */
112
+ yawZ: number;
113
+ }
114
+ export declare function resolveRotationState(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number): RotationState | null;
115
+ export type RotateResult = {
116
+ ok: true;
117
+ oldYawZ: number;
118
+ newYawZ: number;
119
+ newRefDirection: [number, number, number];
120
+ } | {
121
+ ok: false;
122
+ reason: string;
123
+ };
124
+ /**
125
+ * Rotate an IfcProduct about the storey-up Z axis by `deltaYaw`
126
+ * radians. Updates RefDirection on the IfcAxis2Placement3D in place
127
+ * when one already exists.
128
+ *
129
+ * Refuses to operate when the placement has no explicit RefDirection
130
+ * (the implicit `[1, 0, 0]` STEP default). Materialising a fresh
131
+ * IfcDirection there would require a multi-mutation atomic undo
132
+ * entry to avoid orphans on undo, which the store doesn't have yet.
133
+ * Every entity emitted by `@ifc-lite/create`'s in-store builders
134
+ * carries an explicit RefDirection, so the implicit branch only
135
+ * trips on hand-rolled source-buffer entities — surfacing a clear
136
+ * refusal beats silently leaking entities.
137
+ */
138
+ export declare function rotateProductYaw(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number, deltaYaw: number): RotateResult;
139
+ export {};
140
+ //# sourceMappingURL=placement-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement-core.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/placement-core.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE5E;uEACuE;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAC9B,SAAS,EAAE,YAAY,EACvB,SAAS,EAAE,MAAM,KACd,OAAO,EAAE,GAAG,IAAI,CAAC;AAUtB;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAE3E;AAED,KAAK,WAAW,GAAG,OAAO,EAAE,CAAC;AAqB7B;+EAC+E;AAC/E,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAW1N;AAED;;;;;G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