@bldrs-ai/conway 1.348.1109 → 1.349.1111

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.
@@ -69608,7 +69608,7 @@ var IfcStepParser = class extends StepParser {
69608
69608
  IfcStepParser.Instance = new IfcStepParser();
69609
69609
 
69610
69610
  // compiled/src/version/version.js
69611
- var versionString = "Conway Web-Ifc Shim v1.348.1109";
69611
+ var versionString = "Conway Web-Ifc Shim v1.349.1111";
69612
69612
 
69613
69613
  // compiled/src/statistics/statistics.js
69614
69614
  var Statistics = class {
@@ -85869,7 +85869,7 @@ var IfcSceneBuilder = class {
85869
85869
  };
85870
85870
 
85871
85871
  // compiled/src/version/version.js
85872
- var versionString = "Conway Web-Ifc Shim v1.348.1109";
85872
+ var versionString = "Conway Web-Ifc Shim v1.349.1111";
85873
85873
 
85874
85874
  // compiled/src/statistics/statistics.js
85875
85875
  var Statistics = class {
@@ -79320,7 +79320,7 @@ var ExtractResult;
79320
79320
  })(ExtractResult || (ExtractResult = {}));
79321
79321
 
79322
79322
  // compiled/src/version/version.js
79323
- var versionString = "Conway Web-Ifc Shim v1.348.1109";
79323
+ var versionString = "Conway Web-Ifc Shim v1.349.1111";
79324
79324
 
79325
79325
  // compiled/src/statistics/statistics.js
79326
79326
  var Statistics = class {
@@ -69606,7 +69606,7 @@ var IfcStepParser = class extends StepParser {
69606
69606
  IfcStepParser.Instance = new IfcStepParser();
69607
69607
 
69608
69608
  // compiled/src/version/version.js
69609
- var versionString = "Conway Web-Ifc Shim v1.348.1109";
69609
+ var versionString = "Conway Web-Ifc Shim v1.349.1111";
69610
69610
 
69611
69611
  // compiled/src/statistics/statistics.js
69612
69612
  var Statistics = class {
@@ -36,12 +36,12 @@ export declare class AP214Properties {
36
36
  * denotes:
37
37
  *
38
38
  * - a **property single** (a `descriptive_/measure_representation_item` id,
39
- * referenced from a pset's `HasProperties`) → `{ expressID, Name: {value},
40
- * NominalValue: {value} }`, the shape `unpackHelper` reads after it
39
+ * referenced from a pset's `HasProperties`) → `{ expressID, Name: {type,value},
40
+ * NominalValue: {type,value} }`, the shape `unpackHelper` reads after it
41
41
  * dereferences a `HasProperties` handle;
42
42
  * - a **tree node** (NAUO occurrence id, or `product_definition[_shape]` id
43
- * for single-part files) → `{ expressID, Name: {value} }`, the part's
44
- * identity row.
43
+ * for single-part files) → `{ expressID, Name: {type,value} }`, the part's
44
+ * identity row that the Properties panel runs through `deref`.
45
45
  *
46
46
  * Property-single ids and node ids are disjoint (distinct STEP entities), so
47
47
  * the lookup is unambiguous.
@@ -1 +1 @@
1
- {"version":3,"file":"ap214_properties.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ap214_properties.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AA0E/C;;;;;;;;;;;GAWG;AACH,qBAAa,eAAe;IAWb,OAAO,CAAC,GAAG;IATxB,OAAO,CAAC,eAAe,CAAC,CAAwB;IAChD,OAAO,CAAC,YAAY,CAAC,CAAsB;IAC3C,OAAO,CAAC,iBAAiB,CAAC,CAAqB;IAC/C,OAAO,CAAC,oBAAoB,CAAC,CAAqB;IAClD,OAAO,CAAC,iBAAiB,CAAC,CAAgC;IAE1D;;OAEG;gBACkB,GAAG,EAAE,gBAAgB;IAG1C;;;;;;OAMG;IACH,UAAU,CAAE,IAAI,EAAE,MAAM,GAAI,MAAM;IAIlC;;;;;;;;;;;;;;;;;;OAkBG;IACG,iBAAiB,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,MAAM,CAAC;IAoBzE;;;;;;;;;;;OAWG;IACG,eAAe,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAkD7E;;;;;;OAMG;IACG,iBAAiB,CAAE,SAAS,EAAE,MA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;;;OAkBG;IACG,iBAAiB,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,MAAM,CAAC;IAoBzE;;;;;;;;;;;OAWG;IACG,eAAe,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAkD7E;;;;;;OAMG;IACG,iBAAiB,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAI/E;;;;;;OAMG;IACG,sBAAsB,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAIpF;;;;;;;OAOG;IACG,mBAAmB,CAAE,iBAAiB,CAAC,EAAE,OAAO,GAAI,OAAO,CAAC,IAAI,CAAC;IAuBvE;;;;;;OAMG;IACG,iBAAiB,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAmBzE;;;;;;;OAOG;YACW,aAAa;IAwB3B;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAmBtB;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;IA6BpB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAUlB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAQnB"}
@@ -1,5 +1,24 @@
1
1
  import { AP214ProductStructureExtraction, } from "../../AP214E3_2010/ap214_product_structure_extraction.js";
2
2
  import { AP214PropertyExtraction, } from "../../AP214E3_2010/ap214_property_extraction.js";
3
+ /**
4
+ * web-ifc tape type codes `deref` switches on: 1 = string (decoded via
5
+ * `decodeIFCString`), 4 = numeric measure (returned as-is).
6
+ */
7
+ const WEB_IFC_STRING_TYPE = 1;
8
+ const WEB_IFC_MEASURE_TYPE = 4;
9
+ /**
10
+ * Wrap a scalar as a web-ifc value handle carrying the tape type code `deref`
11
+ * needs — string → 1, number → 4.
12
+ *
13
+ * @param value The scalar to wrap.
14
+ * @return {ValueHandle} The typed value handle.
15
+ */
16
+ function valueHandle(value) {
17
+ return {
18
+ type: typeof value === "number" ? WEB_IFC_MEASURE_TYPE : WEB_IFC_STRING_TYPE,
19
+ value,
20
+ };
21
+ }
3
22
  /**
4
23
  * web-ifc tape type code for an entity reference. `unpackHelper` rejects any
5
24
  * `HasProperties` entry whose `type` is not this.
@@ -41,12 +60,12 @@ export class AP214Properties {
41
60
  * denotes:
42
61
  *
43
62
  * - a **property single** (a `descriptive_/measure_representation_item` id,
44
- * referenced from a pset's `HasProperties`) → `{ expressID, Name: {value},
45
- * NominalValue: {value} }`, the shape `unpackHelper` reads after it
63
+ * referenced from a pset's `HasProperties`) → `{ expressID, Name: {type,value},
64
+ * NominalValue: {type,value} }`, the shape `unpackHelper` reads after it
46
65
  * dereferences a `HasProperties` handle;
47
66
  * - a **tree node** (NAUO occurrence id, or `product_definition[_shape]` id
48
- * for single-part files) → `{ expressID, Name: {value} }`, the part's
49
- * identity row.
67
+ * for single-part files) → `{ expressID, Name: {type,value} }`, the part's
68
+ * identity row that the Properties panel runs through `deref`.
50
69
  *
51
70
  * Property-single ids and node ids are disjoint (distinct STEP entities), so
52
71
  * the lookup is unambiguous.
@@ -61,13 +80,13 @@ export class AP214Properties {
61
80
  if (property !== void 0) {
62
81
  return {
63
82
  expressID: id,
64
- Name: { value: property.name },
65
- NominalValue: { value: property.numericValue ?? property.value },
83
+ Name: valueHandle(property.name),
84
+ NominalValue: valueHandle(property.numericValue ?? property.value),
66
85
  };
67
86
  }
68
87
  return {
69
88
  expressID: id,
70
- Name: { value: this.nodeNameByExpressID_.get(id) ?? "" },
89
+ Name: valueHandle(this.nodeNameByExpressID_.get(id) ?? ""),
71
90
  };
72
91
  }
73
92
  /**
@@ -111,7 +130,7 @@ export class AP214Properties {
111
130
  // The set's own id is never dereferenced by the panel; use the first
112
131
  // member's id so it is stable and distinct per group.
113
132
  expressID: hasProperties[0].value,
114
- Name: { value: group.length > 0 ? group : "Attributes" },
133
+ Name: valueHandle(group.length > 0 ? group : "Attributes"),
115
134
  HasProperties: hasProperties,
116
135
  });
117
136
  }
@@ -154,7 +173,7 @@ export class AP214Properties {
154
173
  const syntheticRoot = {
155
174
  expressID: SYNTHETIC_ROOT_EXPRESS_ID,
156
175
  type: "product_structure",
157
- Name: { value: "Model" },
176
+ Name: valueHandle("Model"),
158
177
  productDefinitionExpressID: SYNTHETIC_ROOT_EXPRESS_ID,
159
178
  occurrencePath: [],
160
179
  children: nodes,
@@ -193,7 +212,7 @@ export class AP214Properties {
193
212
  let spatialNode = {
194
213
  expressID: node.expressID,
195
214
  type: node.type,
196
- Name: { value: node.name },
215
+ Name: valueHandle(node.name),
197
216
  productDefinitionExpressID: node.productDefinitionExpressID,
198
217
  occurrencePath: node.occurrencePath,
199
218
  children,
@@ -46,6 +46,33 @@ describe("compat/web-ifc/AP214Properties", () => {
46
46
  expect(item.expressID).toBe(root.expressID);
47
47
  expect(item.Name.value).toBe("as1");
48
48
  });
49
+ test("value handles carry a deref-compatible web-ifc type (string => 1)", async () => {
50
+ // Regression: the Properties panel runs a node's identity row through
51
+ // @bldrs-ai/ifclib `deref`, which only unwraps a handle whose `type` passes
52
+ // its `isTypeValue` guard (type AND value both present) and switches on type
53
+ // (1 => decodeIFCString). A bare `{ value }` (no type) fell through, so deref
54
+ // returned the wrapping object and React threw "Objects are not valid as a
55
+ // React child (found: object with keys {value})" on every STEP element.
56
+ const surface = compatSurfaceFor("data/as1-assembly.step");
57
+ const root = await surface.getSpatialStructure();
58
+ const item = await surface.getItemProperties(root.expressID);
59
+ // Both the spatial-node label and the identity row must be typed handles.
60
+ expect(root.Name.type).toBe(1);
61
+ expect(item.Name.type).toBe(1);
62
+ });
63
+ test("resolved property single carries typed Name and NominalValue handles", async () => {
64
+ const surface = compatSurfaceFor("data/nist-ctc-properties.step");
65
+ const psets = await surface.getPropertySets(CTC_PRODUCT_DEFINITION_EXPRESS_ID);
66
+ const ref = psets[0].HasProperties[0];
67
+ const prop = await surface.getItemProperties(ref.value);
68
+ // The property name is always a string => type 1. The value's type depends
69
+ // on whether it is descriptive or numeric, but it must be a deref code (1 or
70
+ // 4) and non-null so deref's isTypeValue guard passes and unwraps it rather
71
+ // than rendering the raw object.
72
+ expect(prop.Name.type).toBe(1);
73
+ expect([1, 4]).toContain(prop.NominalValue.type);
74
+ expect(prop.NominalValue.value).not.toBe(null);
75
+ });
49
76
  test("getPropertySets emits IfcPropertySet-shaped sets with reference HasProperties", async () => {
50
77
  const surface = compatSurfaceFor("data/nist-ctc-properties.step");
51
78
  const psets = await surface.getPropertySets(CTC_PRODUCT_DEFINITION_EXPRESS_ID);
@@ -5,5 +5,5 @@
5
5
  // only the first segment (major) is meaningful and is the one CI carries forward.
6
6
  // Must stay in `vN.N.N` shape: the CI stamp regex, scripts/updateVersion.mjs, and
7
7
  // statistics.ts all match `v\d+\.\d+\.\d+`.
8
- const versionString = 'Conway Web-Ifc Shim v1.348.1109';
8
+ const versionString = 'Conway Web-Ifc Shim v1.349.1111';
9
9
  export { versionString };