@ifc-lite/sdk 9.6.0 → 10.0.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 (123) hide show
  1. package/dist/cost-reference-scan.js +1 -1
  2. package/dist/cost-reference-scan.js.map +1 -1
  3. package/dist/effective-record-overlay.js +1 -1
  4. package/dist/effective-record-overlay.js.map +1 -1
  5. package/dist/headless/backend-query.d.ts.map +1 -1
  6. package/dist/headless/backend-query.js +13 -5
  7. package/dist/headless/backend-query.js.map +1 -1
  8. package/dist/headless/headless-backend-modelling.d.ts +24 -5
  9. package/dist/headless/headless-backend-modelling.d.ts.map +1 -1
  10. package/dist/headless/headless-backend-modelling.js +34 -3
  11. package/dist/headless/headless-backend-modelling.js.map +1 -1
  12. package/dist/headless/headless-backend-roof.d.ts +4 -0
  13. package/dist/headless/headless-backend-roof.d.ts.map +1 -0
  14. package/dist/headless/headless-backend-roof.js +15 -0
  15. package/dist/headless/headless-backend-roof.js.map +1 -0
  16. package/dist/headless/headless-backend-store.d.ts.map +1 -1
  17. package/dist/headless/headless-backend-store.js +8 -2
  18. package/dist/headless/headless-backend-store.js.map +1 -1
  19. package/dist/headless/headless-backend-structural-store.d.ts +23 -20
  20. package/dist/headless/headless-backend-structural-store.d.ts.map +1 -1
  21. package/dist/headless/headless-backend-structural-store.js +12 -0
  22. package/dist/headless/headless-backend-structural-store.js.map +1 -1
  23. package/dist/headless/mutation-base.d.ts.map +1 -1
  24. package/dist/headless/mutation-base.js +4 -5
  25. package/dist/headless/mutation-base.js.map +1 -1
  26. package/dist/headless/overlay.d.ts.map +1 -1
  27. package/dist/headless/overlay.js +7 -5
  28. package/dist/headless/overlay.js.map +1 -1
  29. package/dist/headless/schema-tables.d.ts.map +1 -1
  30. package/dist/headless/schema-tables.js +8 -6
  31. package/dist/headless/schema-tables.js.map +1 -1
  32. package/dist/namespaces/export.d.ts +2 -0
  33. package/dist/namespaces/export.d.ts.map +1 -1
  34. package/dist/namespaces/export.js +11 -2
  35. package/dist/namespaces/export.js.map +1 -1
  36. package/dist/namespaces/store-group.d.ts +2 -2
  37. package/dist/namespaces/store-group.d.ts.map +1 -1
  38. package/dist/namespaces/store-group.js +2 -2
  39. package/dist/namespaces/store-group.js.map +1 -1
  40. package/dist/namespaces/store-modelling.d.ts +19 -4
  41. package/dist/namespaces/store-modelling.d.ts.map +1 -1
  42. package/dist/namespaces/store-modelling.js +32 -1
  43. package/dist/namespaces/store-modelling.js.map +1 -1
  44. package/dist/namespaces/store-roof.d.ts +13 -0
  45. package/dist/namespaces/store-roof.d.ts.map +1 -0
  46. package/dist/namespaces/store-roof.js +19 -0
  47. package/dist/namespaces/store-roof.js.map +1 -0
  48. package/dist/namespaces/store-storey.d.ts +39 -0
  49. package/dist/namespaces/store-storey.d.ts.map +1 -0
  50. package/dist/namespaces/store-storey.js +64 -0
  51. package/dist/namespaces/store-storey.js.map +1 -0
  52. package/dist/namespaces/store-structural.d.ts +49 -0
  53. package/dist/namespaces/store-structural.d.ts.map +1 -0
  54. package/dist/namespaces/store-structural.js +64 -0
  55. package/dist/namespaces/store-structural.js.map +1 -0
  56. package/dist/namespaces/store.d.ts +12 -35
  57. package/dist/namespaces/store.d.ts.map +1 -1
  58. package/dist/namespaces/store.js +10 -54
  59. package/dist/namespaces/store.js.map +1 -1
  60. package/dist/review/portable-analysis.d.ts.map +1 -1
  61. package/dist/review/portable-analysis.js +2 -1
  62. package/dist/review/portable-analysis.js.map +1 -1
  63. package/dist/review/portable-ids-report.d.ts +3 -0
  64. package/dist/review/portable-ids-report.d.ts.map +1 -1
  65. package/dist/review/portable-ids-report.js +4 -11
  66. package/dist/review/portable-ids-report.js.map +1 -1
  67. package/dist/store-authoring-exports.d.ts +6 -1
  68. package/dist/store-authoring-exports.d.ts.map +1 -1
  69. package/dist/store-authoring-exports.js +4 -0
  70. package/dist/store-authoring-exports.js.map +1 -1
  71. package/dist/store-authoring-types.d.ts +3 -1
  72. package/dist/store-authoring-types.d.ts.map +1 -1
  73. package/dist/store-copy-refs.d.ts +20 -0
  74. package/dist/store-copy-refs.d.ts.map +1 -0
  75. package/dist/store-copy-refs.js +9 -0
  76. package/dist/store-copy-refs.js.map +1 -0
  77. package/dist/store-modelling-backend-without-storeys.d.ts +11 -0
  78. package/dist/store-modelling-backend-without-storeys.d.ts.map +1 -0
  79. package/dist/store-modelling-backend-without-storeys.js +198 -0
  80. package/dist/store-modelling-backend-without-storeys.js.map +1 -0
  81. package/dist/store-modelling-backend.d.ts +9 -3
  82. package/dist/store-modelling-backend.d.ts.map +1 -1
  83. package/dist/store-modelling-backend.js +3 -140
  84. package/dist/store-modelling-backend.js.map +1 -1
  85. package/dist/store-modelling-types.d.ts +30 -7
  86. package/dist/store-modelling-types.d.ts.map +1 -1
  87. package/dist/store-ordinary-backend.d.ts +2 -1
  88. package/dist/store-ordinary-backend.d.ts.map +1 -1
  89. package/dist/store-ordinary-backend.js +14 -8
  90. package/dist/store-ordinary-backend.js.map +1 -1
  91. package/dist/store-roof-backend.d.ts +4 -0
  92. package/dist/store-roof-backend.d.ts.map +1 -0
  93. package/dist/store-roof-backend.js +15 -0
  94. package/dist/store-roof-backend.js.map +1 -0
  95. package/dist/store-roof-types.d.ts +8 -0
  96. package/dist/store-roof-types.d.ts.map +1 -0
  97. package/dist/store-roof-types.js +5 -0
  98. package/dist/store-roof-types.js.map +1 -0
  99. package/dist/store-storey-backend.d.ts +5 -0
  100. package/dist/store-storey-backend.d.ts.map +1 -0
  101. package/dist/store-storey-backend.js +54 -0
  102. package/dist/store-storey-backend.js.map +1 -0
  103. package/dist/store-storey-types.d.ts +41 -0
  104. package/dist/store-storey-types.d.ts.map +1 -0
  105. package/dist/store-storey-types.js +5 -0
  106. package/dist/store-storey-types.js.map +1 -0
  107. package/dist/store-structural-backend.d.ts +1 -1
  108. package/dist/store-structural-backend.d.ts.map +1 -1
  109. package/dist/store-structural-backend.js +74 -12
  110. package/dist/store-structural-backend.js.map +1 -1
  111. package/dist/store-structural-derive.d.ts +22 -0
  112. package/dist/store-structural-derive.d.ts.map +1 -0
  113. package/dist/store-structural-derive.js +26 -0
  114. package/dist/store-structural-derive.js.map +1 -0
  115. package/dist/store-structural-types.d.ts +19 -2
  116. package/dist/store-structural-types.d.ts.map +1 -1
  117. package/dist/store-top-types.d.ts +13 -0
  118. package/dist/store-top-types.d.ts.map +1 -0
  119. package/dist/store-top-types.js +5 -0
  120. package/dist/store-top-types.js.map +1 -0
  121. package/dist/types.d.ts +11 -7
  122. package/dist/types.d.ts.map +1 -1
  123. package/package.json +27 -18
@@ -0,0 +1,20 @@
1
+ /**
2
+ * What `bim.store.copyElements`, `arrayElements` and `copyToStoreys` return
3
+ * (#9352): one ref per selected element per transform, in selection order,
4
+ * including a door or window selected with its wall (it is copied with the
5
+ * wall). A copy whose top could not follow its new storey says so.
6
+ */
7
+ import type { SelectedCopy } from '@ifc-lite/create';
8
+ import type { EntityRef } from './types.js';
9
+ /** A copy left fixed at its source's height because its top could not follow its new storey. */
10
+ export interface CopyUnattachedTopNotice {
11
+ /** The copy (the selected element's copy or one it carries). */
12
+ readonly expressId: number;
13
+ readonly reason: string;
14
+ }
15
+ export interface CopiedElementRef extends EntityRef {
16
+ /** Copies of this element, or of what it carries, that keep their height and are no longer attached. Absent when none. */
17
+ readonly unattachedTops?: readonly CopyUnattachedTopNotice[];
18
+ }
19
+ export declare function copiedElementRefs(modelId: string, copies: readonly SelectedCopy[]): CopiedElementRef[];
20
+ //# sourceMappingURL=store-copy-refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-copy-refs.d.ts","sourceRoot":"","sources":["../src/store-copy-refs.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,gGAAgG;AAChG,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,0HAA0H;IAC1H,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC9D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,gBAAgB,EAAE,CAItG"}
@@ -0,0 +1,9 @@
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
+ export function copiedElementRefs(modelId, copies) {
5
+ return copies.map(({ copyId, unattachedTops }) => unattachedTops?.length
6
+ ? { modelId, expressId: copyId, unattachedTops: unattachedTops.map(({ copyId: expressId, reason }) => ({ expressId, reason })) }
7
+ : { modelId, expressId: copyId });
8
+ }
9
+ //# sourceMappingURL=store-copy-refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-copy-refs.js","sourceRoot":"","sources":["../src/store-copy-refs.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAwB/D,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,MAA+B;IAChF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,cAAc,EAAE,MAAM;QACtE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;QAChI,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { CostStoreModelResolution } from './cost-store-backend.js';
2
+ import type { ModellingStoreBackendMethodsWithoutStoreys } from './store-modelling-types.js';
3
+ /** Same per-call resolution the cost and structural factories take. */
4
+ export type ModellingStoreModelResolver = (modelId?: string) => CostStoreModelResolution;
5
+ /**
6
+ * Every modelling method except the storey ones (#9200), for a host that
7
+ * supplies its own: the viewer routes `bim.store`'s storey methods through its
8
+ * history-tracked storey adapter.
9
+ */
10
+ export declare function createModellingStoreBackendWithoutStoreys(resolve: ModellingStoreModelResolver): ModellingStoreBackendMethodsWithoutStoreys;
11
+ //# sourceMappingURL=store-modelling-backend-without-storeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-modelling-backend-without-storeys.d.ts","sourceRoot":"","sources":["../src/store-modelling-backend-without-storeys.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,4BAA4B,CAAC;AAM7F,uEAAuE;AACvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,wBAAwB,CAAC;AAEzF;;;;GAIG;AACH,wBAAgB,yCAAyC,CAAC,OAAO,EAAE,2BAA2B,GAAG,0CAA0C,CAgL1I"}
@@ -0,0 +1,198 @@
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
+ /**
5
+ * Builds `bim.store`'s wall-join, hosted element, type and material methods
6
+ * (#6232), for the same reason `createStructuralStoreBackend` exists: every
7
+ * host implementing `StoreBackendMethods` (CLI headless backend, viewer store
8
+ * adapter) spreads this in instead of re-deriving the host anchor and
9
+ * re-wiring the builders.
10
+ *
11
+ * The host is resolved per call through `resolveHostAnchor` against the host's
12
+ * live mutation view, so a wall authored earlier in the same session can take
13
+ * an opening exactly like one read from the file.
14
+ *
15
+ * The storey methods are not here (#9200). `createModellingStoreBackend`
16
+ * (store-modelling-backend.ts) adds them. This module must not import
17
+ * `createStoreyStoreBackend`: a bundle is split by module, so a host that
18
+ * calls only this factory (the viewer, whose storey methods load on first use)
19
+ * then leaves the storey planners out.
20
+ */
21
+ import { mirrorElementsInStore, addClassificationInStore, assignClassificationInStore, copyBatchInStore, copyToStoreysInStore, copiesOfSelection, arrayCopyTransforms, applyNewElementTop, editHostedElementInStore, addCurtainWallToStore, addGridToStore, addColumnOnGridToStore, addElementTypeToStore, addMaterialLayerSetToStore, addMaterialLayerSetUsageToStore, addMaterialToStore, assignMaterialInStore, assignTypeInStore, joinWallsInStore, resolveWallJoinAnchor, liveEntityConforms, liveEntityType, readRelatedLists, resolveAuthoringAnchor, resolveBodyContextId, applyLayerThicknessInStore, followTypeLayersOnRetypeInStore, typeOccurrencesInStore, addHostedElementInStore, addStairToStore, addRailingToStore, resolveSpatialAnchor, removeStairInStore, replaceElementInStore, } from '@ifc-lite/create';
22
+ import { copiedElementRefs } from './store-copy-refs.js';
23
+ import { createPhysicalStoreBackend } from './store-physical-backend.js';
24
+ import { createRoofStoreBackend } from './store-roof-backend.js';
25
+ /**
26
+ * Every modelling method except the storey ones (#9200), for a host that
27
+ * supplies its own: the viewer routes `bim.store`'s storey methods through its
28
+ * history-tracked storey adapter.
29
+ */
30
+ export function createModellingStoreBackendWithoutStoreys(resolve) {
31
+ const ref = (modelId, expressId) => ({ modelId, expressId });
32
+ const editTarget = (model) => ({ dataStore: model.store, view: model.mutationView, editor: model.editor });
33
+ const authoring = (modelId) => {
34
+ const model = resolve(modelId);
35
+ return { model, anchor: { ...resolveAuthoringAnchor(model.store, model.mutationView), ownerHistoryId: model.ownerHistoryId } };
36
+ };
37
+ /**
38
+ * Refuse, before anything is written, a relating entity or an object that is
39
+ * not live or is not of a class the relationship slot takes in the model's
40
+ * schema (`IfcRelDefinesByType.RelatingType` is an IfcTypeObject, and so on).
41
+ */
42
+ const requireKinds = (model, op, checks) => {
43
+ for (const [ids, kinds] of checks) {
44
+ for (const id of ids) {
45
+ if (kinds.some((kind) => liveEntityConforms(model.store, id, kind, model.mutationView)))
46
+ continue;
47
+ const type = liveEntityType(model.store, id, model.mutationView);
48
+ throw new Error(`bim.store.${op}: #${id} is ${type ? `an ${type}, not an ${kinds.join(' or ')}` : 'not a live entity'}`);
49
+ }
50
+ }
51
+ };
52
+ return {
53
+ mirrorElements(modelId, ids, params) {
54
+ const model = resolve(modelId);
55
+ return mirrorElementsInStore(model.store, model.editor, ids, params).map(id => ref(model.modelId, id));
56
+ },
57
+ addClassification(modelId, params) {
58
+ const model = resolve(modelId);
59
+ return ref(model.modelId, addClassificationInStore(model.store, model.editor, params));
60
+ },
61
+ assignClassification(modelId, classificationId, objects) {
62
+ const model = resolve(modelId);
63
+ return ref(model.modelId, assignClassificationInStore(model.store, model.editor, classificationId, objects));
64
+ },
65
+ ...createPhysicalStoreBackend(resolve),
66
+ ...createRoofStoreBackend(resolve),
67
+ copyElements(modelId, expressIds, transforms) {
68
+ const model = resolve(modelId);
69
+ const results = copyBatchInStore(model.store, model.editor, expressIds, transforms);
70
+ return copiedElementRefs(model.modelId, copiesOfSelection(expressIds, results, transforms.length).flat());
71
+ },
72
+ copyToStoreys(modelId, expressIds, storeyIds) {
73
+ const model = resolve(modelId);
74
+ return copyToStoreysInStore(model.store, model.editor, expressIds, storeyIds)
75
+ .map(({ storeyId, copies }) => ({ storeyId, refs: copiedElementRefs(model.modelId, copies) }));
76
+ },
77
+ duplicateElement(entity, options) {
78
+ const model = resolve(entity.modelId);
79
+ const [result] = copyBatchInStore(model.store, model.editor, [entity.expressId], [{ offset: options.offset }], { duplicate: { name: options.Name } });
80
+ return ref(model.modelId, result.copyId);
81
+ },
82
+ arrayElements(modelId, expressIds, params) {
83
+ const transforms = arrayCopyTransforms(params);
84
+ if (!transforms)
85
+ throw new Error('Array requires an anchor and a nonzero linear direction');
86
+ const model = resolve(modelId);
87
+ const results = copyBatchInStore(model.store, model.editor, expressIds, transforms);
88
+ return copiedElementRefs(model.modelId, copiesOfSelection(expressIds, results, transforms.length).flat());
89
+ },
90
+ editHostedElement(entity, patch) {
91
+ const model = resolve(entity.modelId);
92
+ editHostedElementInStore(model.store, model.editor, entity.expressId, patch);
93
+ return ref(model.modelId, entity.expressId);
94
+ },
95
+ addCurtainWall(modelId, storeyExpressId, { TopConstraint, ...params }) {
96
+ const model = resolve(modelId);
97
+ const built = model.editor.runAtomic(draft => {
98
+ const wall = addCurtainWallToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params);
99
+ applyNewElementTop(model.store, draft, wall.curtainWallId, TopConstraint ?? 'auto', storeyExpressId);
100
+ return wall;
101
+ });
102
+ return ref(model.modelId, built.curtainWallId);
103
+ },
104
+ addGrid(modelId, storeyExpressId, params) {
105
+ const model = resolve(modelId);
106
+ const built = model.editor.runAtomic(draft => addGridToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
107
+ return ref(model.modelId, built.gridId);
108
+ },
109
+ addColumnOnGrid(modelId, storeyExpressId, { TopConstraint, ...params }, binding) {
110
+ const model = resolve(modelId);
111
+ const built = model.editor.runAtomic(draft => {
112
+ const column = addColumnOnGridToStore(draft, model.store, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params, binding);
113
+ applyNewElementTop(model.store, draft, column.columnId, TopConstraint ?? 'auto', storeyExpressId);
114
+ return column;
115
+ });
116
+ return ref(model.modelId, built.columnId);
117
+ },
118
+ replaceElement(entity, storeyExpressId, element) {
119
+ const model = resolve(entity.modelId);
120
+ const built = replaceElementInStore(model.store, model.editor, entity.expressId, draft => resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), element);
121
+ return ref(model.modelId, built.expressId);
122
+ },
123
+ removeStair(entity) {
124
+ const model = resolve(entity.modelId);
125
+ removeStairInStore(model.store, model.editor, entity.expressId);
126
+ return true;
127
+ },
128
+ addStair(modelId, storeyExpressId, params) {
129
+ const model = resolve(modelId);
130
+ const built = model.editor.runAtomic(draft => addStairToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
131
+ return ref(model.modelId, built.stairId);
132
+ },
133
+ addRailing(modelId, storeyExpressId, params) {
134
+ const model = resolve(modelId);
135
+ const built = model.editor.runAtomic(draft => addRailingToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
136
+ return ref(model.modelId, built.railingId);
137
+ },
138
+ joinWalls(modelId, aExpressId, bExpressId, options = {}) {
139
+ const model = resolve(modelId);
140
+ const joined = model.editor.runAtomic(draft => joinWallsInStore(draft, model.store, resolveWallJoinAnchor(model.store, draft.getMutationView()), aExpressId, bExpressId, options));
141
+ return ref(model.modelId, joined.relId);
142
+ },
143
+ addOpening(modelId, hostExpressId, params) {
144
+ const model = resolve(modelId);
145
+ return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'opening', params }).expressId);
146
+ },
147
+ addHostedDoor(modelId, hostExpressId, params) {
148
+ const model = resolve(modelId);
149
+ return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'door', params }).expressId);
150
+ },
151
+ addHostedWindow(modelId, hostExpressId, params) {
152
+ const model = resolve(modelId);
153
+ return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'window', params }).expressId);
154
+ },
155
+ addElementType(modelId, params) {
156
+ const { model, anchor } = authoring(modelId);
157
+ return ref(model.modelId, addElementTypeToStore(model.editor, anchor, params).typeId);
158
+ },
159
+ assignType(modelId, typeExpressId, objectExpressIds) {
160
+ const { model, anchor } = authoring(modelId);
161
+ requireKinds(model, 'assignType', [[[typeExpressId], ['IfcTypeObject']], [objectExpressIds, ['IfcObject']]]);
162
+ // An occurrence drawn with its old type follows the new type's layers, not the old type's (#9296).
163
+ followTypeLayersOnRetypeInStore(editTarget(model), typeExpressId, objectExpressIds);
164
+ const existing = readRelatedLists(model.store, 'IfcRelDefinesByType', model.mutationView);
165
+ const rel = assignTypeInStore(model.editor, anchor, typeExpressId, objectExpressIds, existing).relId;
166
+ // A layered type drives the thickness of what it types, in the same record (one undo step).
167
+ applyLayerThicknessInStore(editTarget(model), objectExpressIds);
168
+ return ref(model.modelId, rel);
169
+ },
170
+ addMaterial(modelId, params) {
171
+ const { model, anchor } = authoring(modelId);
172
+ const representationContextId = params.Color === undefined ? null : resolveBodyContextId(model.store, model.mutationView);
173
+ return ref(model.modelId, addMaterialToStore(model.editor, anchor, params, { representationContextId }).materialId);
174
+ },
175
+ addMaterialLayerSet(modelId, params) {
176
+ const { model, anchor } = authoring(modelId);
177
+ return ref(model.modelId, addMaterialLayerSetToStore(model.editor, anchor, params).layerSetId);
178
+ },
179
+ addMaterialLayerSetUsage(modelId, params) {
180
+ const { model, anchor } = authoring(modelId);
181
+ requireKinds(model, 'addMaterialLayerSetUsage', [[[params.ForLayerSet], ['IfcMaterialLayerSet']]]);
182
+ return ref(model.modelId, addMaterialLayerSetUsageToStore(model.editor, anchor, params).usageId);
183
+ },
184
+ assignMaterial(modelId, materialExpressId, objectExpressIds) {
185
+ const { model, anchor } = authoring(modelId);
186
+ requireKinds(model, 'assignMaterial', [[[materialExpressId], ['IfcMaterialSelect']], [objectExpressIds, ['IfcObjectDefinition', 'IfcPropertyDefinition']]]);
187
+ const existing = readRelatedLists(model.store, 'IfcRelAssociatesMaterial', model.mutationView);
188
+ const rel = assignMaterialInStore(model.editor, anchor, materialExpressId, objectExpressIds, existing).relId;
189
+ // A layer set given to an occurrence sizes it; given to a type, it sizes every occurrence the
190
+ // type types (an occurrence's own layer set still wins). Same record, so one undo step.
191
+ const isType = (id) => liveEntityConforms(model.store, id, 'IfcTypeObject', model.mutationView);
192
+ const sized = objectExpressIds.flatMap(id => isType(id) ? typeOccurrencesInStore(editTarget(model), id) : [id]);
193
+ applyLayerThicknessInStore(editTarget(model), sized);
194
+ return ref(model.modelId, rel);
195
+ },
196
+ };
197
+ }
198
+ //# sourceMappingURL=store-modelling-backend-without-storeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-modelling-backend-without-storeys.js","sourceRoot":"","sources":["../src/store-modelling-backend-without-storeys.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,qBAAqB,EAAE,wBAAwB,EAAE,2BAA2B,EAC5E,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAClG,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EAKtB,uBAAuB,EAKvB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EAGpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAKjE;;;;GAIG;AACH,MAAM,UAAU,yCAAyC,CAAC,OAAoC;IAC5F,MAAM,GAAG,GAAG,CAAC,OAAe,EAAE,SAAiB,EAAa,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IACxF,MAAM,UAAU,GAAG,CAAC,KAA+B,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE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C,mBAAmB,CAAC,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5J,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,0BAA0B,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;YAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7G,8FAA8F;YAC9F,wFAAwF;YACxF,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;YACxG,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAChH,0BAA0B,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;YACrD,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,6 +1,12 @@
1
- import type { CostStoreModelResolution } from './cost-store-backend.js';
1
+ /**
2
+ * `bim.store`'s full modelling surface: everything
3
+ * `createModellingStoreBackendWithoutStoreys` builds plus the storey methods.
4
+ * The CLI and headless backends spread this. It is its own module so that a
5
+ * host using only the storey-free factory does not link the storey planners
6
+ * (#9200).
7
+ */
2
8
  import type { ModellingStoreBackendMethods } from './store-modelling-types.js';
3
- /** Same per-call resolution the cost and structural factories take. */
4
- export type ModellingStoreModelResolver = (modelId?: string) => CostStoreModelResolution;
9
+ import { type ModellingStoreModelResolver } from './store-modelling-backend-without-storeys.js';
10
+ export type { ModellingStoreModelResolver } from './store-modelling-backend-without-storeys.js';
5
11
  export declare function createModellingStoreBackend(resolve: ModellingStoreModelResolver): ModellingStoreBackendMethods;
6
12
  //# sourceMappingURL=store-modelling-backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-modelling-backend.d.ts","sourceRoot":"","sources":["../src/store-modelling-backend.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAI/E,uEAAuE;AACvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,wBAAwB,CAAC;AAEzF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,CA6I9G"}
1
+ {"version":3,"file":"store-modelling-backend.d.ts","sourceRoot":"","sources":["../src/store-modelling-backend.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAA6C,KAAK,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAG3I,YAAY,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAEhG,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,CAE9G"}
@@ -1,146 +1,9 @@
1
1
  /* This Source Code Form is subject to the terms of the Mozilla Public
2
2
  * License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
- /**
5
- * Builds `bim.store`'s wall-join, hosted element, type and material methods
6
- * (#6232), for the
7
- * same reason `createStructuralStoreBackend` exists: every host implementing
8
- * `StoreBackendMethods` (CLI headless backend, viewer store adapter) spreads
9
- * this in instead of re-deriving the host anchor and re-wiring the builders.
10
- *
11
- * The host is resolved per call through `resolveHostAnchor` against the host's
12
- * live mutation view, so a wall authored earlier in the same session can take
13
- * an opening exactly like one read from the file.
14
- */
15
- import { copyBatchInStore, arrayCopyTransforms, editHostedElementInStore, addCurtainWallToStore, addGridToStore, addColumnOnGridToStore, addElementTypeToStore, addMaterialLayerSetToStore, addMaterialLayerSetUsageToStore, addMaterialToStore, assignMaterialInStore, assignTypeInStore, joinWallsInStore, resolveWallJoinAnchor, liveEntityConforms, liveEntityType, readRelatedLists, resolveAuthoringAnchor, addHostedElementInStore, addStairToStore, addRailingToStore, resolveSpatialAnchor, removeStairInStore, replaceElementInStore, } from '@ifc-lite/create';
16
- import { createPhysicalStoreBackend } from './store-physical-backend.js';
4
+ import { createModellingStoreBackendWithoutStoreys } from './store-modelling-backend-without-storeys.js';
5
+ import { createStoreyStoreBackend } from './store-storey-backend.js';
17
6
  export function createModellingStoreBackend(resolve) {
18
- const ref = (modelId, expressId) => ({ modelId, expressId });
19
- const authoring = (modelId) => {
20
- const model = resolve(modelId);
21
- return { model, anchor: { ...resolveAuthoringAnchor(model.store, model.mutationView), ownerHistoryId: model.ownerHistoryId } };
22
- };
23
- /**
24
- * Refuse, before anything is written, a relating entity or an object that is
25
- * not live or is not of a class the relationship slot takes in the model's
26
- * schema (`IfcRelDefinesByType.RelatingType` is an IfcTypeObject, and so on).
27
- */
28
- const requireKinds = (model, op, checks) => {
29
- for (const [ids, kinds] of checks) {
30
- for (const id of ids) {
31
- if (kinds.some((kind) => liveEntityConforms(model.store, id, kind, model.mutationView)))
32
- continue;
33
- const type = liveEntityType(model.store, id, model.mutationView);
34
- throw new Error(`bim.store.${op}: #${id} is ${type ? `an ${type}, not an ${kinds.join(' or ')}` : 'not a live entity'}`);
35
- }
36
- }
37
- };
38
- return {
39
- ...createPhysicalStoreBackend(resolve),
40
- copyElements(modelId, expressIds, transforms) {
41
- const model = resolve(modelId);
42
- return copyBatchInStore(model.store, model.editor, expressIds, transforms)
43
- .map(result => ref(model.modelId, result.copyId));
44
- },
45
- duplicateElement(entity, options) {
46
- const model = resolve(entity.modelId);
47
- const [result] = copyBatchInStore(model.store, model.editor, [entity.expressId], [{ offset: options.offset }], { duplicate: { name: options.Name } });
48
- return ref(model.modelId, result.copyId);
49
- },
50
- arrayElements(modelId, expressIds, params) {
51
- const transforms = arrayCopyTransforms(params);
52
- if (!transforms)
53
- throw new Error('Array requires an anchor and a nonzero linear direction');
54
- const model = resolve(modelId);
55
- return copyBatchInStore(model.store, model.editor, expressIds, transforms)
56
- .map(result => ref(model.modelId, result.copyId));
57
- },
58
- editHostedElement(entity, patch) {
59
- const model = resolve(entity.modelId);
60
- editHostedElementInStore(model.store, model.editor, entity.expressId, patch);
61
- return ref(model.modelId, entity.expressId);
62
- },
63
- addCurtainWall(modelId, storeyExpressId, params) {
64
- const model = resolve(modelId);
65
- const built = model.editor.runAtomic(draft => addCurtainWallToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
66
- return ref(model.modelId, built.curtainWallId);
67
- },
68
- addGrid(modelId, storeyExpressId, params) {
69
- const model = resolve(modelId);
70
- const built = model.editor.runAtomic(draft => addGridToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
71
- return ref(model.modelId, built.gridId);
72
- },
73
- addColumnOnGrid(modelId, storeyExpressId, params, binding) {
74
- const model = resolve(modelId);
75
- const built = model.editor.runAtomic(draft => addColumnOnGridToStore(draft, model.store, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params, binding));
76
- return ref(model.modelId, built.columnId);
77
- },
78
- replaceElement(entity, storeyExpressId, element) {
79
- const model = resolve(entity.modelId);
80
- const built = replaceElementInStore(model.store, model.editor, entity.expressId, draft => resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), element);
81
- return ref(model.modelId, built.expressId);
82
- },
83
- removeStair(entity) {
84
- const model = resolve(entity.modelId);
85
- removeStairInStore(model.store, model.editor, entity.expressId);
86
- return true;
87
- },
88
- addStair(modelId, storeyExpressId, params) {
89
- const model = resolve(modelId);
90
- const built = model.editor.runAtomic(draft => addStairToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
91
- return ref(model.modelId, built.stairId);
92
- },
93
- addRailing(modelId, storeyExpressId, params) {
94
- const model = resolve(modelId);
95
- const built = model.editor.runAtomic(draft => addRailingToStore(draft, resolveSpatialAnchor(model.store, storeyExpressId, draft.getMutationView()), params));
96
- return ref(model.modelId, built.railingId);
97
- },
98
- joinWalls(modelId, aExpressId, bExpressId, options = {}) {
99
- const model = resolve(modelId);
100
- const joined = model.editor.runAtomic(draft => joinWallsInStore(draft, model.store, resolveWallJoinAnchor(model.store, draft.getMutationView()), aExpressId, bExpressId, options));
101
- return ref(model.modelId, joined.relId);
102
- },
103
- addOpening(modelId, hostExpressId, params) {
104
- const model = resolve(modelId);
105
- return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'opening', params }).expressId);
106
- },
107
- addHostedDoor(modelId, hostExpressId, params) {
108
- const model = resolve(modelId);
109
- return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'door', params }).expressId);
110
- },
111
- addHostedWindow(modelId, hostExpressId, params) {
112
- const model = resolve(modelId);
113
- return ref(model.modelId, addHostedElementInStore(model.store, model.editor, hostExpressId, { kind: 'window', params }).expressId);
114
- },
115
- addElementType(modelId, params) {
116
- const { model, anchor } = authoring(modelId);
117
- return ref(model.modelId, addElementTypeToStore(model.editor, anchor, params).typeId);
118
- },
119
- assignType(modelId, typeExpressId, objectExpressIds) {
120
- const { model, anchor } = authoring(modelId);
121
- requireKinds(model, 'assignType', [[[typeExpressId], ['IfcTypeObject']], [objectExpressIds, ['IfcObject']]]);
122
- const existing = readRelatedLists(model.store, 'IfcRelDefinesByType', model.mutationView);
123
- return ref(model.modelId, assignTypeInStore(model.editor, anchor, typeExpressId, objectExpressIds, existing).relId);
124
- },
125
- addMaterial(modelId, params) {
126
- const { model, anchor } = authoring(modelId);
127
- return ref(model.modelId, addMaterialToStore(model.editor, anchor, params).materialId);
128
- },
129
- addMaterialLayerSet(modelId, params) {
130
- const { model, anchor } = authoring(modelId);
131
- return ref(model.modelId, addMaterialLayerSetToStore(model.editor, anchor, params).layerSetId);
132
- },
133
- addMaterialLayerSetUsage(modelId, params) {
134
- const { model, anchor } = authoring(modelId);
135
- requireKinds(model, 'addMaterialLayerSetUsage', [[[params.ForLayerSet], ['IfcMaterialLayerSet']]]);
136
- return ref(model.modelId, addMaterialLayerSetUsageToStore(model.editor, anchor, params).usageId);
137
- },
138
- assignMaterial(modelId, materialExpressId, objectExpressIds) {
139
- const { model, anchor } = authoring(modelId);
140
- requireKinds(model, 'assignMaterial', [[[materialExpressId], ['IfcMaterialSelect']], [objectExpressIds, ['IfcObjectDefinition', 'IfcPropertyDefinition']]]);
141
- const existing = readRelatedLists(model.store, 'IfcRelAssociatesMaterial', model.mutationView);
142
- return ref(model.modelId, assignMaterialInStore(model.editor, anchor, materialExpressId, objectExpressIds, existing).relId);
143
- },
144
- };
7
+ return { ...createModellingStoreBackendWithoutStoreys(resolve), ...createStoreyStoreBackend(resolve) };
145
8
  }
146
9
  //# sourceMappingURL=store-modelling-backend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-modelling-backend.js","sourceRoot":"","sources":["../src/store-modelling-backend.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EACL,gBAAgB,EAAE,mBAAmB,EACrC,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EAKtB,uBAAuB,EAK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,CAAC,EAAE,GAAG,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;AACzG,CAAC"}
@@ -4,30 +4,51 @@
4
4
  * of `types.ts` (allowlisted, at budget) like `store-structural-types.ts`, and
5
5
  * like it the param shapes come straight from `@ifc-lite/create`.
6
6
  */
7
- import type { CopyTransform, CopyArrayParams, HostedElementEdit, CurtainWallInStoreParams, GridInStoreParams, GridColumnBinding, ColumnInStoreParams, ProfiledColumnInStoreParams, ElementTypeInStoreParams, MaterialInStoreParams, MaterialLayerSetInStoreParams, MaterialLayerSetUsageInStoreParams, HostedDoorInStoreParams, HostedWindowInStoreParams, OpeningInStoreParams, WallJoinApplyOptions, InStoreReplacementElement, StairInStoreParams, RailingInStoreParams } from '@ifc-lite/create';
7
+ import type { CopyTransform, CopyArrayParams, MirrorElementsParams, ClassificationInStoreParams, HostedElementEdit, CurtainWallInStoreParams, GridInStoreParams, GridColumnBinding, ColumnInStoreParams, ProfiledColumnInStoreParams, ElementTypeInStoreParams, MaterialInStoreParams, MaterialLayerSetInStoreParams, MaterialLayerSetUsageInStoreParams, HostedDoorInStoreParams, HostedWindowInStoreParams, OpeningInStoreParams, WallJoinApplyOptions, InStoreReplacementElement, StairInStoreParams, RailingInStoreParams } from '@ifc-lite/create';
8
8
  import type { RoomCommand, RoomCommandResult } from './store-room-command.js';
9
9
  import type { EntityRef } from './types.js';
10
+ import type { CopiedElementRef } from './store-copy-refs.js';
10
11
  import type { PhysicalStoreBackendMethods } from './store-physical-types.js';
11
- export interface ModellingStoreBackendMethods extends PhysicalStoreBackendMethods {
12
+ import type { StoreyStoreBackendMethods } from './store-storey-types.js';
13
+ import type { TopConstraintParams } from './store-top-types.js';
14
+ import type { RoofStoreBackendMethods } from './store-roof-types.js';
15
+ export interface ModellingStoreBackendMethods extends PhysicalStoreBackendMethods, StoreyStoreBackendMethods, RoofStoreBackendMethods {
16
+ mirrorElements?(modelId: string, ids: readonly number[], params: MirrorElementsParams): EntityRef[];
17
+ addClassification?(modelId: string, params: ClassificationInStoreParams): EntityRef;
18
+ assignClassification?(modelId: string, classificationId: number, objects: readonly number[]): EntityRef;
12
19
  /** Native mesh/DCEL Room operations with atomic history-aware layout edits. */
13
20
  roomCommand?(modelId: string, storeyId: number, command: RoomCommand): Promise<RoomCommandResult>;
14
- /** Copy a dependency-pruned selection once per storey-local transform, atomically. */
15
- copyElements?(modelId: string, expressIds: readonly number[], transforms: readonly CopyTransform[]): EntityRef[];
21
+ /**
22
+ * Copy a dependency-pruned selection once per storey-local transform, atomically. A copy on another
23
+ * storey re-resolves its top attachment there: one attached to the storey above its own attaches to
24
+ * the storey above its new one (#9296). Returns one ref per selected element per transform, in
25
+ * selection order (a door selected with its wall is its copy in the wall's copy); a copy whose top
26
+ * could not follow its new storey is listed in its ref's `unattachedTops` (#9352).
27
+ */
28
+ copyElements?(modelId: string, expressIds: readonly number[], transforms: readonly CopyTransform[]): CopiedElementRef[];
29
+ /**
30
+ * Copy a selection onto each of `storeyIds` (same plan position and height above the floor) in one
31
+ * atomic, undoable operation; the copies come back per storey, in the order given.
32
+ */
33
+ copyToStoreys?(modelId: string, expressIds: readonly number[], storeyIds: readonly number[]): Array<{
34
+ storeyId: number;
35
+ refs: CopiedElementRef[];
36
+ }>;
16
37
  /** Duplicate with the viewer naming policy; explicit storey-local IFC XYZ displacement. */
17
38
  duplicateElement?(ref: EntityRef, options: {
18
39
  offset: [number, number, number];
19
40
  Name?: string;
20
41
  }): EntityRef;
21
42
  /** Array count includes the original; full circles exclude a coincident final copy. */
22
- arrayElements?(modelId: string, expressIds: readonly number[], params: CopyArrayParams): EntityRef[];
43
+ arrayElements?(modelId: string, expressIds: readonly number[], params: CopyArrayParams): CopiedElementRef[];
23
44
  /** Edit the physical hosted cut/filling together, preserving identity and relationships. Metres, host-local. */
24
45
  editHostedElement?(ref: EntityRef, patch: HostedElementEdit): EntityRef;
25
46
  /** Complete IfcCurtainWall aggregate, including its member and panel bodies. */
26
- addCurtainWall?(modelId: string, storeyExpressId: number, params: CurtainWallInStoreParams): EntityRef;
47
+ addCurtainWall?(modelId: string, storeyExpressId: number, params: CurtainWallInStoreParams & TopConstraintParams): EntityRef;
27
48
  /** IfcGrid with straight, tagged axes and its FootPrint representation. */
28
49
  addGrid?(modelId: string, storeyExpressId: number, params: GridInStoreParams): EntityRef;
29
50
  /** Persist a column on a live grid crossing; stale or foreign bindings are refused. */
30
- addColumnOnGrid?(modelId: string, storeyExpressId: number, params: ColumnInStoreParams | ProfiledColumnInStoreParams, binding: GridColumnBinding): EntityRef;
51
+ addColumnOnGrid?(modelId: string, storeyExpressId: number, params: (ColumnInStoreParams | ProfiledColumnInStoreParams) & TopConstraintParams, binding: GridColumnBinding): EntityRef;
31
52
  /** Optional capability: replace a live product and its uniquely owned stair flight atomically. */
32
53
  replaceElement?(ref: EntityRef, storeyExpressId: number, element: InStoreReplacementElement): EntityRef;
33
54
  /** Optional host capability: a storey-local IfcStair aggregating one IfcStairFlight. Returns the stair. */
@@ -57,4 +78,6 @@ export interface ModellingStoreBackendMethods extends PhysicalStoreBackendMethod
57
78
  /** Associate a material (any IfcMaterialSelect) with objects via `IfcRelAssociatesMaterial`, replacing their previous association. Returns the relationship. */
58
79
  assignMaterial(modelId: string, materialExpressId: number, objectExpressIds: number[]): EntityRef;
59
80
  }
81
+ /** What `createModellingStoreBackendWithoutStoreys` builds: everything but the storey methods. */
82
+ export type ModellingStoreBackendMethodsWithoutStoreys = Omit<ModellingStoreBackendMethods, keyof StoreyStoreBackendMethods>;
60
83
  //# sourceMappingURL=store-modelling-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-modelling-types.d.ts","sourceRoot":"","sources":["../src/store-modelling-types.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,eAAe,EAC9B,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,qB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C;IACjG,gKAAgK;IAChK,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACnG;AAED,kGAAkG;AAClG,MAAM,MAAM,0CAA0C,GAAG,IAAI,CAAC,4BAA4B,EAAE,MAAM,yBAAyB,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type WallAutojoinIndex } from '@ifc-lite/create';
1
2
  import type { CostStoreModelResolution } from './cost-store-backend.js';
2
3
  import type { StoreBackendMethods } from './types.js';
3
4
  /** Existing ordinary creation methods, without adding required backend members. */
@@ -6,5 +7,5 @@ export type OrdinaryStoreBackendMethods = Pick<StoreBackendMethods, 'addWall' |
6
7
  * create's atomic dispatcher (#6232 D5). Anchor resolution retains its strict
7
8
  * existing-placement policy. Hosts add permission, publication and history
8
9
  * behavior outside this factory; MCP supplies its compound-recording draft. */
9
- export declare function createOrdinaryStoreBackend(resolve: (modelId: string) => Pick<CostStoreModelResolution, 'modelId' | 'store' | 'editor' | 'mutationView'>): OrdinaryStoreBackendMethods;
10
+ export declare function createOrdinaryStoreBackend(resolve: (modelId: string) => Pick<CostStoreModelResolution, 'modelId' | 'store' | 'editor' | 'mutationView'>, wallIndex?: WallAutojoinIndex): OrdinaryStoreBackendMethods;
10
11
  //# sourceMappingURL=store-ordinary-backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-ordinary-backend.d.ts","sourceRoot":"","sources":["../src/store-ordinary-backend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjE,mFAAmF;AACnF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,mBAAmB,EAChE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC;AAEvG;;;+EAG+E;AAC/E,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,wBAAwB,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAC,GAC5G,2BAA2B,CAiB7B"}
1
+ {"version":3,"file":"store-ordinary-backend.d.ts","sourceRoot":"","sources":["../src/store-ordinary-backend.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgF,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxI,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjE,mFAAmF;AACnF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,mBAAmB,EAChE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC;AAKvG;;;+EAG+E;AAC/E,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,wBAAwB,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAC,EAC7G,SAAS,CAAC,EAAE,iBAAiB,GAC5B,2BAA2B,CAuB7B"}