@bldrs-ai/conway 1.381.1195 → 1.383.1196

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.
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
30
30
  var readline = __toESM(require("node:readline"), 1);
31
31
 
32
32
  // compiled/src/version/version.js
33
- var versionString = "Conway v1.381.1195";
33
+ var versionString = "Conway v1.383.1196";
34
34
 
35
35
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
36
36
  var wasmType = "";
@@ -5452,6 +5452,41 @@ var StepModelBase = class {
5452
5452
  const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
5453
5453
  return this.typeIndex.count(...distinctTypes);
5454
5454
  }
5455
+ /**
5456
+ * Iterate the express IDs of entities of a set of types (including sub-types)
5457
+ * without materializing entity descriptors or touching the source buffer —
5458
+ * only the type index and the express ID column are read, so this stays cheap
5459
+ * and safe even when the model source has been spilled to an external store.
5460
+ *
5461
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
5462
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
5463
+ *
5464
+ * @param types The list of types to iterate.
5465
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
5466
+ * @yields {number} The express ID of each matching entity.
5467
+ */
5468
+ *expressIDsOfTypes(...types) {
5469
+ const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
5470
+ const cursor = this.typeIndex.cursor(...distinctTypes);
5471
+ const expressIDs = this.expressID_;
5472
+ const firstInlineElement = this.firstInlineElement_;
5473
+ try {
5474
+ while (cursor.step()) {
5475
+ const high = cursor.high;
5476
+ let low = cursor.low;
5477
+ while (low !== 0) {
5478
+ const lowestOneHot = extractOneHotLow(low);
5479
+ low ^= 1 << lowestOneHot;
5480
+ const localID = high | lowestOneHot;
5481
+ if (localID < firstInlineElement) {
5482
+ yield expressIDs[localID];
5483
+ }
5484
+ }
5485
+ }
5486
+ } finally {
5487
+ cursor.free();
5488
+ }
5489
+ }
5455
5490
  /**
5456
5491
  * Get the non empty type IDs for this.
5457
5492
  *
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
14965
14965
  var import_process = require("process");
14966
14966
 
14967
14967
  // compiled/src/version/version.js
14968
- var versionString = "Conway v1.381.1195";
14968
+ var versionString = "Conway v1.383.1196";
14969
14969
 
14970
14970
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
14971
14971
  function pThreadsAllowed() {
@@ -21266,6 +21266,41 @@ var StepModelBase = class {
21266
21266
  const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
21267
21267
  return this.typeIndex.count(...distinctTypes);
21268
21268
  }
21269
+ /**
21270
+ * Iterate the express IDs of entities of a set of types (including sub-types)
21271
+ * without materializing entity descriptors or touching the source buffer —
21272
+ * only the type index and the express ID column are read, so this stays cheap
21273
+ * and safe even when the model source has been spilled to an external store.
21274
+ *
21275
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
21276
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
21277
+ *
21278
+ * @param types The list of types to iterate.
21279
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
21280
+ * @yields {number} The express ID of each matching entity.
21281
+ */
21282
+ *expressIDsOfTypes(...types) {
21283
+ const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
21284
+ const cursor = this.typeIndex.cursor(...distinctTypes);
21285
+ const expressIDs = this.expressID_;
21286
+ const firstInlineElement = this.firstInlineElement_;
21287
+ try {
21288
+ while (cursor.step()) {
21289
+ const high = cursor.high;
21290
+ let low = cursor.low;
21291
+ while (low !== 0) {
21292
+ const lowestOneHot = extractOneHotLow(low);
21293
+ low ^= 1 << lowestOneHot;
21294
+ const localID = high | lowestOneHot;
21295
+ if (localID < firstInlineElement) {
21296
+ yield expressIDs[localID];
21297
+ }
21298
+ }
21299
+ }
21300
+ } finally {
21301
+ cursor.free();
21302
+ }
21303
+ }
21269
21304
  /**
21270
21305
  * Get the non empty type IDs for this.
21271
21306
  *
@@ -15912,7 +15912,7 @@ var ParsingBuffer = class {
15912
15912
  };
15913
15913
 
15914
15914
  // compiled/src/version/version.js
15915
- var versionString = "Conway v1.381.1195";
15915
+ var versionString = "Conway v1.383.1196";
15916
15916
 
15917
15917
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
15918
15918
  function pThreadsAllowed() {
@@ -21057,6 +21057,41 @@ var StepModelBase = class {
21057
21057
  const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
21058
21058
  return this.typeIndex.count(...distinctTypes);
21059
21059
  }
21060
+ /**
21061
+ * Iterate the express IDs of entities of a set of types (including sub-types)
21062
+ * without materializing entity descriptors or touching the source buffer —
21063
+ * only the type index and the express ID column are read, so this stays cheap
21064
+ * and safe even when the model source has been spilled to an external store.
21065
+ *
21066
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
21067
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
21068
+ *
21069
+ * @param types The list of types to iterate.
21070
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
21071
+ * @yields {number} The express ID of each matching entity.
21072
+ */
21073
+ *expressIDsOfTypes(...types) {
21074
+ const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
21075
+ const cursor = this.typeIndex.cursor(...distinctTypes);
21076
+ const expressIDs = this.expressID_;
21077
+ const firstInlineElement = this.firstInlineElement_;
21078
+ try {
21079
+ while (cursor.step()) {
21080
+ const high = cursor.high;
21081
+ let low = cursor.low;
21082
+ while (low !== 0) {
21083
+ const lowestOneHot = extractOneHotLow(low);
21084
+ low ^= 1 << lowestOneHot;
21085
+ const localID = high | lowestOneHot;
21086
+ if (localID < firstInlineElement) {
21087
+ yield expressIDs[localID];
21088
+ }
21089
+ }
21090
+ }
21091
+ } finally {
21092
+ cursor.free();
21093
+ }
21094
+ }
21060
21095
  /**
21061
21096
  * Get the non empty type IDs for this.
21062
21097
  *
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
944
944
  var entity_types_ifc_gen_default = EntityTypesIfc;
945
945
 
946
946
  // compiled/src/version/version.js
947
- var versionString = "Conway v1.381.1195";
947
+ var versionString = "Conway v1.383.1196";
948
948
 
949
949
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
950
950
  var wasmType = "";
@@ -5450,6 +5450,41 @@ var StepModelBase = class {
5450
5450
  const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
5451
5451
  return this.typeIndex.count(...distinctTypes);
5452
5452
  }
5453
+ /**
5454
+ * Iterate the express IDs of entities of a set of types (including sub-types)
5455
+ * without materializing entity descriptors or touching the source buffer —
5456
+ * only the type index and the express ID column are read, so this stays cheap
5457
+ * and safe even when the model source has been spilled to an external store.
5458
+ *
5459
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
5460
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
5461
+ *
5462
+ * @param types The list of types to iterate.
5463
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
5464
+ * @yields {number} The express ID of each matching entity.
5465
+ */
5466
+ *expressIDsOfTypes(...types) {
5467
+ const distinctTypes = types.length === 1 ? types[0].query : new Set(types.flatMap((type) => type.query));
5468
+ const cursor = this.typeIndex.cursor(...distinctTypes);
5469
+ const expressIDs = this.expressID_;
5470
+ const firstInlineElement = this.firstInlineElement_;
5471
+ try {
5472
+ while (cursor.step()) {
5473
+ const high = cursor.high;
5474
+ let low = cursor.low;
5475
+ while (low !== 0) {
5476
+ const lowestOneHot = extractOneHotLow(low);
5477
+ low ^= 1 << lowestOneHot;
5478
+ const localID = high | lowestOneHot;
5479
+ if (localID < firstInlineElement) {
5480
+ yield expressIDs[localID];
5481
+ }
5482
+ }
5483
+ }
5484
+ } finally {
5485
+ cursor.free();
5486
+ }
5487
+ }
5453
5488
  /**
5454
5489
  * Get the non empty type IDs for this.
5455
5490
  *
@@ -212,6 +212,23 @@ export declare class IfcAPI {
212
212
  * @return {boolean} True when the spill happened.
213
213
  */
214
214
  SpillModelSource(modelID: number, store: StepExternalByteStore, chunkBytes?: number, maxResidentChunks?: number): boolean;
215
+ /**
216
+ * Conway extension: lazily iterate the express IDs of all root-derived
217
+ * (GlobalId-bearing) entities — products, relationships, property sets,
218
+ * quantities — straight from the type index. No entity descriptors are
219
+ * materialised and the source buffer is never touched, so this is safe
220
+ * and cheap even after SpillModelSource, and lets property sweeps skip
221
+ * the geometric-resource records that dominate large models.
222
+ *
223
+ * Multi-mapped entities may be yielded once per mapping; callers that
224
+ * need distinct IDs should dedupe. Returns undefined when the model
225
+ * doesn't exist or its schema has no root-type notion (e.g. AP214).
226
+ *
227
+ * @param modelID The model to iterate.
228
+ * @return {IterableIterator<number> | undefined} Lazy express ID
229
+ * iterator, or undefined when unsupported.
230
+ */
231
+ RootExpressIDs(modelID: number): IterableIterator<number> | undefined;
215
232
  /**
216
233
  *
217
234
  * @param modelID
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_api.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,IAAI,mBAAmB,EACjE,MAAM,aAAa,CAAA;AAGrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,cAAc,UAAU,CAAA;AAGxB,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB,eAAO,MAAM,MAAM,IAAI,CAAA;AACvB,eAAO,MAAM,KAAK,IAAI,C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UAAQ;IAM1C,sDAAsD;IACtD,gBAAgB,IAAI,MAAM;IAI1B,2FAA2F;IAC3F,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG;CAGpC"}
@@ -261,6 +261,30 @@ export class IfcAPI {
261
261
  result.spillSourceToExternalStore(store, chunkBytes, maxResidentChunks);
262
262
  return true;
263
263
  }
264
+ /**
265
+ * Conway extension: lazily iterate the express IDs of all root-derived
266
+ * (GlobalId-bearing) entities — products, relationships, property sets,
267
+ * quantities — straight from the type index. No entity descriptors are
268
+ * materialised and the source buffer is never touched, so this is safe
269
+ * and cheap even after SpillModelSource, and lets property sweeps skip
270
+ * the geometric-resource records that dominate large models.
271
+ *
272
+ * Multi-mapped entities may be yielded once per mapping; callers that
273
+ * need distinct IDs should dedupe. Returns undefined when the model
274
+ * doesn't exist or its schema has no root-type notion (e.g. AP214).
275
+ *
276
+ * @param modelID The model to iterate.
277
+ * @return {IterableIterator<number> | undefined} Lazy express ID
278
+ * iterator, or undefined when unsupported.
279
+ */
280
+ RootExpressIDs(modelID) {
281
+ const result = this.models.get(modelID);
282
+ if (result === void 0) {
283
+ Logger.error("[RootExpressIDs]: model === undefined");
284
+ return void 0;
285
+ }
286
+ return result.rootExpressIDs?.();
287
+ }
264
288
  /**
265
289
  *
266
290
  * @param modelID
@@ -34,5 +34,12 @@ export interface IfcApiModelPassthrough {
34
34
  * synchronous read succeeds. Fast no-op while fully resident.
35
35
  */
36
36
  ensureLineResident?(expressID: number): Promise<void>;
37
+ /**
38
+ * Optional: lazily iterate the express IDs of all root-derived
39
+ * (GlobalId-bearing) entities via the type index, without
40
+ * materialising entities or touching the source buffer.
41
+ * Multi-mapped entities may repeat; callers should dedupe.
42
+ */
43
+ rootExpressIDs?(): IterableIterator<number>;
37
44
  }
38
45
  //# sourceMappingURL=ifc_api_model_passthrough.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_api_model_passthrough.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/if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GAAG,WAAW,CAAA;IAEnD;;;OAGG;IACH,kBAAkB,CAAC,IAAI,IAAI,CAAA;IAE3B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC;;;OAGG;IACH,0BAA0B,CAAC,CACzB,KAAK,EAAE,qBAAqB,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,GAAI,IAAI,CAAA;IAEpC;;;OAGG;IACH,kBAAkB,CAAC,CAAE,SAAS,EAAE,MAAM,GAAI,OAAO,CAAE,IAAI,CAAE,CAAA;IAEzD;;;;;OAKG;IACH,cAAc,CAAC,IAAI,gBAAgB,CAAE,MAAM,CAAE,CAAA;CAC9C"}
@@ -205,6 +205,19 @@ export declare class IfcApiProxyIfc implements IfcApiModelPassthrough {
205
205
  * @return {Promise<void>} Resolves when resident.
206
206
  */
207
207
  ensureLineResident(expressID: number): Promise<void>;
208
+ /**
209
+ * Lazily iterate the express IDs of all IfcRoot-derived entities
210
+ * (products, relationships, property sets, quantities — everything
211
+ * carrying a GlobalId) straight from the type index, without
212
+ * materialising entity descriptors or touching the source buffer.
213
+ *
214
+ * This lets property sweeps skip the ~96% of records in large models
215
+ * that are geometric resources, and stays safe on a spilled source.
216
+ * Multi-mapped entities may repeat, so callers should dedupe.
217
+ *
218
+ * @return {IterableIterator<number>} Express IDs of IfcRoot subtypes.
219
+ */
220
+ rootExpressIDs(): IterableIterator<number>;
208
221
  /**
209
222
  *
210
223
  * @param modelID
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_api_proxy_ifc.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_proxy_ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,O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,MAAM,GAAG,QAAQ;IAqDxC;;;;;OAKG;IACH,4BAA4B,IAAI,IAAI;CAwBrC"}
@@ -14,7 +14,7 @@ import Memory from "../../memory/memory.js";
14
14
  import { FromRawLineData } from "./ifc2x4_helper.js";
15
15
  import { shimIfcEntityMap, shimIfcEntityReverseMap } from "./shim_schema_mapping.js";
16
16
  import { EntityTypesIfcCount } from "../../ifc/ifc4_gen/entity_types_ifc.gen.js";
17
- import { IfcProduct } from "../../ifc/ifc4_gen/index.js";
17
+ import { IfcProduct, IfcRoot } from "../../ifc/ifc4_gen/index.js";
18
18
  import { CanonicalMeshType } from "../../index.js";
19
19
  /**
20
20
  * The proxy for IFC from the shim.
@@ -535,6 +535,21 @@ export class IfcApiProxyIfc {
535
535
  async ensureLineResident(expressID) {
536
536
  await this.model[0].ensureResidentByExpressID(expressID);
537
537
  }
538
+ /**
539
+ * Lazily iterate the express IDs of all IfcRoot-derived entities
540
+ * (products, relationships, property sets, quantities — everything
541
+ * carrying a GlobalId) straight from the type index, without
542
+ * materialising entity descriptors or touching the source buffer.
543
+ *
544
+ * This lets property sweeps skip the ~96% of records in large models
545
+ * that are geometric resources, and stays safe on a spilled source.
546
+ * Multi-mapped entities may repeat, so callers should dedupe.
547
+ *
548
+ * @return {IterableIterator<number>} Express IDs of IfcRoot subtypes.
549
+ */
550
+ rootExpressIDs() {
551
+ return this.model[0].expressIDsOfTypes(IfcRoot);
552
+ }
538
553
  /**
539
554
  *
540
555
  * @param modelID
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ifc_root_express_ids.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ifc_root_express_ids.test.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_root_express_ids.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ // Tests for the roots-only express ID iterator (RootExpressIDs).
3
+ //
4
+ // Parity requirement: the iterator yields exactly the GlobalId-bearing
5
+ // (IfcRoot-derived) records — no geometric resources — and it must do so
6
+ // straight from the type index: no descriptor materialisation and no
7
+ // source-buffer reads, so it keeps working on a spilled model with
8
+ // nothing resident (where sync getLine throws).
9
+ import * as fs from "fs";
10
+ import { beforeAll, describe, expect, test } from "@jest/globals";
11
+ import { InMemoryStepByteStore } from "../../step/step_buffer_provider.js";
12
+ import { IfcAPI } from "./ifc_api.js";
13
+ const SETTINGS = { COORDINATE_TO_ORIGIN: true, USE_FAST_BOOLS: true };
14
+ // Tiny windows force the spilled model to have ~nothing resident.
15
+ const CHUNK_BYTES = 512;
16
+ const MAX_RESIDENT_CHUNKS = 3;
17
+ let api;
18
+ let buffer;
19
+ /** Open a fresh model from the shared fixture bytes. */
20
+ function openModel() {
21
+ return api.OpenModel(buffer, SETTINGS);
22
+ }
23
+ /**
24
+ * Collect the distinct express IDs of records whose decoded properties
25
+ * carry a GlobalId — the ground truth the type-index iterator must match.
26
+ *
27
+ * @param modelID The model to sweep.
28
+ * @return {Promise<Set<number>>} Express IDs of GlobalId-bearing records.
29
+ */
30
+ async function globalIdBearingIDs(modelID) {
31
+ const lineIDs = api.getPassthrough(modelID).getAllLines();
32
+ const result = new Set();
33
+ for (let i = 0; i < lineIDs.size(); i++) {
34
+ const expressID = lineIDs.get(i);
35
+ const properties = await api.properties.getItemProperties(modelID, expressID);
36
+ if (properties?.GlobalId !== void 0 && properties?.GlobalId !== null) {
37
+ result.add(expressID);
38
+ }
39
+ }
40
+ return result;
41
+ }
42
+ beforeAll(async () => {
43
+ api = new IfcAPI();
44
+ await api.Init();
45
+ buffer = new Uint8Array(fs.readFileSync("data/index.ifc"));
46
+ }, 120000);
47
+ describe("RootExpressIDs", () => {
48
+ test("yields exactly the GlobalId-bearing records", async () => {
49
+ const modelID = openModel();
50
+ const expected = await globalIdBearingIDs(modelID);
51
+ // Multi-mapped entities may repeat, so dedupe through a Set.
52
+ const roots = new Set(api.RootExpressIDs(modelID));
53
+ expect(roots.size).toBeGreaterThan(10);
54
+ expect(roots).toEqual(expected);
55
+ // And strictly fewer records than the whole model — the point is
56
+ // skipping the geometric resources.
57
+ const totalLines = api.getPassthrough(modelID).getAllLines().size();
58
+ expect(roots.size).toBeLessThan(totalLines);
59
+ api.CloseModel(modelID);
60
+ }, 120000);
61
+ test("works on a spilled model with nothing resident", async () => {
62
+ const modelID = openModel();
63
+ const passthrough = api.getPassthrough(modelID);
64
+ const before = new Set(api.RootExpressIDs(modelID));
65
+ const firstID = passthrough.getAllLines().get(0);
66
+ api.SpillModelSource(modelID, new InMemoryStepByteStore(buffer), CHUNK_BYTES, MAX_RESIDENT_CHUNKS);
67
+ api.ReleaseEntityCache(modelID);
68
+ // Sanity: the sync record path really is non-resident here...
69
+ expect(() => passthrough.getLine(firstID)).toThrow(/not resident/);
70
+ // ...yet the iterator never touches the source buffer, so it still
71
+ // yields the identical set.
72
+ expect(new Set(api.RootExpressIDs(modelID))).toEqual(before);
73
+ api.CloseModel(modelID);
74
+ }, 120000);
75
+ test("returns undefined for a missing model", () => {
76
+ expect(api.RootExpressIDs(999999)).toBeUndefined();
77
+ });
78
+ });
@@ -263,6 +263,20 @@ export default abstract class StepModelBase<EntityTypeIDs extends number, BaseEn
263
263
  * @return {number} The number of matching entities.
264
264
  */
265
265
  typeCount<T extends StepEntityConstructorAbstract<EntityTypeIDs>[]>(...types: T): number;
266
+ /**
267
+ * Iterate the express IDs of entities of a set of types (including sub-types)
268
+ * without materializing entity descriptors or touching the source buffer —
269
+ * only the type index and the express ID column are read, so this stays cheap
270
+ * and safe even when the model source has been spilled to an external store.
271
+ *
272
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
273
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
274
+ *
275
+ * @param types The list of types to iterate.
276
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
277
+ * @yields {number} The express ID of each matching entity.
278
+ */
279
+ expressIDsOfTypes<T extends StepEntityConstructorAbstract<EntityTypeIDs>[]>(...types: T): IterableIterator<number>;
266
280
  /**
267
281
  * Get the non empty type IDs for this.
268
282
  *
@@ -1 +1 @@
1
- {"version":3,"file":"step_model_base.d.ts","sourceRoot":"","sources":["../../../src/step/step_model_base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAGL,qBAAqB,EAEtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,gBAAgB,MAAM,sBAAsB,CAAA;AACnD,OAAO,2BAAmE,MAAM,kCAAkC,CAAA;AAClH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,qBAAqB,EAAE,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,aAAa,CACzC,aAAa,SAAS,MAAM,EAC5B,UAAU,SAAS,cAAc,CAAC,aAAa,CAAC,GAAG,cAAc,CAAC,aAAa,CAAC,CAClF,YAAW,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK;aAyElB,MAAM,EAAE,gBAAgB,CAAE,aAAa,EAAE,UAAU,CAAE;IACrE,OAAO,CAAC,OAAO;IAzEjB,kBAAyB,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IAChE,k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;;OAIG;IACI,wBAAwB,IAAK,gBAAgB,CAAE,aAAa,CAAE;IAKrE;;;;;;;OAOG;IACI,OAAO,CAAC,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC,UAAU,CAAC;IAOvE;;;;;;;OAOG;IACI,kBAAkB,CAAC,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC,UAAU,CAAC;IAIlF;;;;;;;;OAQG;IACK,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,GAAE,OAAe,GAAG,gBAAgB,CAAC,UAAU,CAAC;IAyBhG;;;;;;;OAOG;IACK,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC;IAUrE;;;;;;OAMG;IACK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,UAAU,CAAC;IAWzD;;;;;;;OAOG;IACI,2BAA2B,CAAE,IAAI,EAAE,iBAAiB,GACzD,iBAAiB,GAAG,SAAS;IAK/B;;;;;;;OAOG;IACI,uBAAuB,CAAE,IAAI,EAAE,iBAAiB,GAAI,aAAa,GAAG,SAAS;CAIrF"}
@@ -610,6 +610,43 @@ export default class StepModelBase {
610
610
  (new Set(types.flatMap((type) => type.query)));
611
611
  return this.typeIndex.count(...distinctTypes);
612
612
  }
613
+ /**
614
+ * Iterate the express IDs of entities of a set of types (including sub-types)
615
+ * without materializing entity descriptors or touching the source buffer —
616
+ * only the type index and the express ID column are read, so this stays cheap
617
+ * and safe even when the model source has been spilled to an external store.
618
+ *
619
+ * Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded
620
+ * once per matching mapping, so callers that need distinct IDs should dedupe.
621
+ *
622
+ * @param types The list of types to iterate.
623
+ * @return {IterableIterator} A lazy iterator of express IDs for matching entities.
624
+ * @yields {number} The express ID of each matching entity.
625
+ */
626
+ *expressIDsOfTypes(...types) {
627
+ const distinctTypes = types.length === 1 ? (types[0].query) :
628
+ (new Set(types.flatMap((type) => type.query)));
629
+ const cursor = this.typeIndex.cursor(...distinctTypes);
630
+ const expressIDs = this.expressID_;
631
+ const firstInlineElement = this.firstInlineElement_;
632
+ try {
633
+ while (cursor.step()) {
634
+ const high = cursor.high;
635
+ let low = cursor.low;
636
+ while (low !== 0) {
637
+ const lowestOneHot = extractOneHotLow(low);
638
+ low ^= (1 << lowestOneHot);
639
+ const localID = (high | lowestOneHot);
640
+ if (localID < firstInlineElement) {
641
+ yield expressIDs[localID];
642
+ }
643
+ }
644
+ }
645
+ }
646
+ finally {
647
+ cursor.free();
648
+ }
649
+ }
613
650
  /**
614
651
  * Get the non empty type IDs for this.
615
652
  *
@@ -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 v1.381.1195';
8
+ const versionString = 'Conway v1.383.1196';
9
9
  export { versionString };