@ifc-lite/export 3.0.1 → 4.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 (163) hide show
  1. package/README.md +37 -1
  2. package/dist/anonymize-export.d.ts +60 -0
  3. package/dist/anonymize-export.d.ts.map +1 -0
  4. package/dist/anonymize-export.js +217 -0
  5. package/dist/anonymize-export.js.map +1 -0
  6. package/dist/anonymize-placement.d.ts +71 -0
  7. package/dist/anonymize-placement.d.ts.map +1 -0
  8. package/dist/anonymize-placement.js +266 -0
  9. package/dist/anonymize-placement.js.map +1 -0
  10. package/dist/anonymize-scrub.d.ts +64 -0
  11. package/dist/anonymize-scrub.d.ts.map +1 -0
  12. package/dist/anonymize-scrub.js +315 -0
  13. package/dist/anonymize-scrub.js.map +1 -0
  14. package/dist/anonymize-types.d.ts +235 -0
  15. package/dist/anonymize-types.d.ts.map +1 -0
  16. package/dist/anonymize-types.js +5 -0
  17. package/dist/anonymize-types.js.map +1 -0
  18. package/dist/declared-property-type.d.ts +15 -0
  19. package/dist/declared-property-type.d.ts.map +1 -1
  20. package/dist/declared-property-type.js +43 -0
  21. package/dist/declared-property-type.js.map +1 -1
  22. package/dist/entity-type-sets.d.ts +47 -0
  23. package/dist/entity-type-sets.d.ts.map +1 -0
  24. package/dist/entity-type-sets.js +91 -0
  25. package/dist/entity-type-sets.js.map +1 -0
  26. package/dist/georef-closure.d.ts +55 -0
  27. package/dist/georef-closure.d.ts.map +1 -0
  28. package/dist/georef-closure.js +95 -0
  29. package/dist/georef-closure.js.map +1 -0
  30. package/dist/glb.d.ts.map +1 -1
  31. package/dist/glb.js +26 -2
  32. package/dist/glb.js.map +1 -1
  33. package/dist/ifc5-classification.d.ts +36 -0
  34. package/dist/ifc5-classification.d.ts.map +1 -0
  35. package/dist/ifc5-classification.js +46 -0
  36. package/dist/ifc5-classification.js.map +1 -0
  37. package/dist/ifc5-export-helpers.d.ts +32 -0
  38. package/dist/ifc5-export-helpers.d.ts.map +1 -0
  39. package/dist/ifc5-export-helpers.js +84 -0
  40. package/dist/ifc5-export-helpers.js.map +1 -0
  41. package/dist/ifc5-exporter.d.ts.map +1 -1
  42. package/dist/ifc5-exporter.js +14 -86
  43. package/dist/ifc5-exporter.js.map +1 -1
  44. package/dist/ifc5-material.d.ts +38 -0
  45. package/dist/ifc5-material.d.ts.map +1 -0
  46. package/dist/ifc5-material.js +32 -0
  47. package/dist/ifc5-material.js.map +1 -0
  48. package/dist/index.d.ts +5 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +7 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/merged-context.d.ts +100 -0
  53. package/dist/merged-context.d.ts.map +1 -0
  54. package/dist/merged-context.js +211 -0
  55. package/dist/merged-context.js.map +1 -0
  56. package/dist/merged-empty-containers.d.ts +63 -0
  57. package/dist/merged-empty-containers.d.ts.map +1 -0
  58. package/dist/merged-empty-containers.js +354 -0
  59. package/dist/merged-empty-containers.js.map +1 -0
  60. package/dist/merged-exporter.d.ts +28 -67
  61. package/dist/merged-exporter.d.ts.map +1 -1
  62. package/dist/merged-exporter.js +134 -258
  63. package/dist/merged-exporter.js.map +1 -1
  64. package/dist/merged-guid.d.ts +48 -0
  65. package/dist/merged-guid.d.ts.map +1 -0
  66. package/dist/merged-guid.js +128 -0
  67. package/dist/merged-guid.js.map +1 -0
  68. package/dist/merged-rel-aggregates.d.ts +63 -0
  69. package/dist/merged-rel-aggregates.d.ts.map +1 -0
  70. package/dist/merged-rel-aggregates.js +122 -0
  71. package/dist/merged-rel-aggregates.js.map +1 -0
  72. package/dist/merged-remap.d.ts +18 -0
  73. package/dist/merged-remap.d.ts.map +1 -0
  74. package/dist/merged-remap.js +66 -0
  75. package/dist/merged-remap.js.map +1 -0
  76. package/dist/merged-subcontext.d.ts +41 -0
  77. package/dist/merged-subcontext.d.ts.map +1 -0
  78. package/dist/merged-subcontext.js +99 -0
  79. package/dist/merged-subcontext.js.map +1 -0
  80. package/dist/parquet-exporter-ondemand.d.ts +34 -0
  81. package/dist/parquet-exporter-ondemand.d.ts.map +1 -0
  82. package/dist/parquet-exporter-ondemand.js +89 -0
  83. package/dist/parquet-exporter-ondemand.js.map +1 -0
  84. package/dist/parquet-exporter.d.ts +1 -29
  85. package/dist/parquet-exporter.d.ts.map +1 -1
  86. package/dist/parquet-exporter.js +68 -90
  87. package/dist/parquet-exporter.js.map +1 -1
  88. package/dist/parquet-type-strings.d.ts +11 -0
  89. package/dist/parquet-type-strings.d.ts.map +1 -0
  90. package/dist/parquet-type-strings.js +40 -0
  91. package/dist/parquet-type-strings.js.map +1 -0
  92. package/dist/parquet-uint32-columns.d.ts +30 -0
  93. package/dist/parquet-uint32-columns.d.ts.map +1 -0
  94. package/dist/parquet-uint32-columns.js +38 -0
  95. package/dist/parquet-uint32-columns.js.map +1 -0
  96. package/dist/reference-collector.d.ts +47 -51
  97. package/dist/reference-collector.d.ts.map +1 -1
  98. package/dist/reference-collector.js +115 -171
  99. package/dist/reference-collector.js.map +1 -1
  100. package/dist/related-entities.d.ts +10 -0
  101. package/dist/related-entities.d.ts.map +1 -0
  102. package/dist/related-entities.js +274 -0
  103. package/dist/related-entities.js.map +1 -0
  104. package/dist/schema-converter-attr-remap.d.ts +53 -0
  105. package/dist/schema-converter-attr-remap.d.ts.map +1 -0
  106. package/dist/schema-converter-attr-remap.js +106 -0
  107. package/dist/schema-converter-attr-remap.js.map +1 -0
  108. package/dist/schema-converter.d.ts.map +1 -1
  109. package/dist/schema-converter.js +24 -1
  110. package/dist/schema-converter.js.map +1 -1
  111. package/dist/schema-untranslatable.d.ts +35 -0
  112. package/dist/schema-untranslatable.d.ts.map +1 -0
  113. package/dist/schema-untranslatable.js +60 -0
  114. package/dist/schema-untranslatable.js.map +1 -0
  115. package/dist/step-argument-parser.d.ts.map +1 -1
  116. package/dist/step-argument-parser.js +11 -1
  117. package/dist/step-argument-parser.js.map +1 -1
  118. package/dist/step-attribute-mutations.js +14 -11
  119. package/dist/step-attribute-mutations.js.map +1 -1
  120. package/dist/step-collection.d.ts.map +1 -1
  121. package/dist/step-collection.js +51 -8
  122. package/dist/step-collection.js.map +1 -1
  123. package/dist/step-export-types.d.ts +42 -0
  124. package/dist/step-export-types.d.ts.map +1 -1
  125. package/dist/step-export-types.js +10 -0
  126. package/dist/step-export-types.js.map +1 -1
  127. package/dist/step-exporter.d.ts.map +1 -1
  128. package/dist/step-exporter.js +9 -1
  129. package/dist/step-exporter.js.map +1 -1
  130. package/dist/step-header.d.ts +1 -1
  131. package/dist/step-header.d.ts.map +1 -1
  132. package/dist/step-header.js +2 -2
  133. package/dist/step-header.js.map +1 -1
  134. package/dist/step-map-unit.d.ts +2 -1
  135. package/dist/step-map-unit.d.ts.map +1 -1
  136. package/dist/step-map-unit.js.map +1 -1
  137. package/dist/step-serialization.d.ts +10 -30
  138. package/dist/step-serialization.d.ts.map +1 -1
  139. package/dist/step-serialization.js +10 -60
  140. package/dist/step-serialization.js.map +1 -1
  141. package/dist/step-source-iteration.d.ts.map +1 -1
  142. package/dist/step-source-iteration.js +21 -0
  143. package/dist/step-source-iteration.js.map +1 -1
  144. package/dist/style-closure.d.ts +91 -0
  145. package/dist/style-closure.d.ts.map +1 -0
  146. package/dist/style-closure.js +164 -0
  147. package/dist/style-closure.js.map +1 -0
  148. package/dist/subset-entity-reader.d.ts +104 -0
  149. package/dist/subset-entity-reader.d.ts.map +1 -0
  150. package/dist/subset-entity-reader.js +112 -0
  151. package/dist/subset-entity-reader.js.map +1 -0
  152. package/dist/subset-roots.d.ts +74 -0
  153. package/dist/subset-roots.d.ts.map +1 -0
  154. package/dist/subset-roots.js +168 -0
  155. package/dist/subset-roots.js.map +1 -0
  156. package/dist/type-owned-psets.d.ts +19 -0
  157. package/dist/type-owned-psets.d.ts.map +1 -1
  158. package/dist/type-owned-psets.js +31 -0
  159. package/dist/type-owned-psets.js.map +1 -1
  160. package/dist/unit-normalize.d.ts.map +1 -1
  161. package/dist/unit-normalize.js +10 -2
  162. package/dist/unit-normalize.js.map +1 -1
  163. package/package.json +8 -8
@@ -0,0 +1,112 @@
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 { STEP_TRIVIA, getAttributeNamesAcrossSchemas, resolveEntityNameAlias } from '@ifc-lite/parser';
5
+ import { ENTITIES_IFC2X3, ENTITIES_IFC4, ENTITIES_IFC4X3 } from '@ifc-lite/data';
6
+ import { createSourceRefReader, decodeRange } from './source-ref-bounds.js';
7
+ import { splitTopLevelArgs } from './step-argument-parser.js';
8
+ /**
9
+ * `#N=TYPE(...);` record, with STEP trivia (whitespace and/or a
10
+ * `/* ... *​/` comment, #3789) tolerated between the type name and `(` —
11
+ * the same adjacency fix the rest of this package's record readers carry.
12
+ * Without it a wrapped record reads as unparseable, `readEntityArgs` returns
13
+ * `null`, and `anonymize-placement.ts` / `anonymize-scrub.ts` silently skip
14
+ * that entity instead of scrubbing it.
15
+ */
16
+ const RECORD_RE = new RegExp(`^#\\d+\\s*=\\s*(\\w+)${STEP_TRIVIA}\\(([\\s\\S]*)\\)\\s*;\\s*$`);
17
+ /**
18
+ * Read entity `id`'s STEP record out of `store`'s source and split it into
19
+ * its type token and top-level argument list. Returns `null` when the id has
20
+ * no entry in `index`, or when `index`'s byte range cannot actually be read
21
+ * out of `store.source` (`createSourceRefReader` — the same gate
22
+ * `step-pass-builder.ts`'s `isReadableSourceRef` applies), or when the bytes
23
+ * at that range do not parse as a single `#N=TYPE(...);` record.
24
+ *
25
+ * Only reads SOURCE-backed records. An overlay-created entity (no bytes to
26
+ * decode) is out of scope for this module: `anonymize-placement.ts` and
27
+ * `anonymize-scrub.ts` only ever walk/mutate the entities a freshly-parsed
28
+ * source model contains, never ones the private `MutablePropertyView` they
29
+ * build has itself just created.
30
+ */
31
+ export function readEntityArgs(store, index, id) {
32
+ const ref = index.get(id);
33
+ if (!ref)
34
+ return null;
35
+ const isReadable = createSourceRefReader(store.source);
36
+ if (!isReadable(ref))
37
+ return null;
38
+ const line = decodeRange(store.source, ref.byteOffset, ref.byteOffset + ref.byteLength);
39
+ const match = line.match(RECORD_RE);
40
+ if (!match)
41
+ return null;
42
+ const [, type, argsText] = match;
43
+ return { type: type.toUpperCase(), args: splitTopLevelArgs(argsText) };
44
+ }
45
+ const ATTRIBUTE_NAMES_BY_SCHEMA = {
46
+ IFC2X3: attributeTableByUpperName(ENTITIES_IFC2X3),
47
+ IFC4: attributeTableByUpperName(ENTITIES_IFC4),
48
+ IFC4X3: attributeTableByUpperName(ENTITIES_IFC4X3),
49
+ };
50
+ function attributeTableByUpperName(table) {
51
+ const map = new Map();
52
+ for (const entity of table)
53
+ map.set(entity.name.toUpperCase(), entity.attributes);
54
+ return map;
55
+ }
56
+ /**
57
+ * Narrow an `IfcDataStore.schemaVersion` to a {@link SourceStepSchema}
58
+ * `attrIndex` can resolve against, or `undefined` for anything that isn't
59
+ * one of the three bundled STEP schemas (`IFC5`, or an absent/unrecognized
60
+ * value) — callers pass that straight through to `attrIndex`, which then
61
+ * falls back to the pinned-first cross-schema union exactly as it always did.
62
+ */
63
+ export function stepSourceSchema(schemaVersion) {
64
+ return schemaVersion === 'IFC2X3' || schemaVersion === 'IFC4' || schemaVersion === 'IFC4X3'
65
+ ? schemaVersion
66
+ : undefined;
67
+ }
68
+ /**
69
+ * Zero-based positional index of attribute `name` on `type`, or `-1` when
70
+ * `type` declares no such attribute (an unknown type, or a genuine typo).
71
+ *
72
+ * When `schema` is given (the exported model's OWN schema, via
73
+ * {@link stepSourceSchema}), resolves against THAT schema's table first: the
74
+ * three bundled schemas do not always agree on a class's attribute order —
75
+ * e.g. IFC2X3's `IfcApprovalRelationship` puts `Name` at slot 3, IFC4 puts it
76
+ * at slot 0 — so a caller walking an arbitrary, non-fixed type (anything
77
+ * `pseudonymizeAllNames` reaches in `anonymize-scrub.ts`) has to resolve
78
+ * against the source model's actual schema or it silently reads/writes the
79
+ * wrong slot on every class the schemas disagree about. Falls back to
80
+ * `getAttributeNamesAcrossSchemas` — the pinned-IFC4-first cross-schema
81
+ * union this function always used before schema-aware resolution existed —
82
+ * when `schema` is omitted, or when `schema`'s own table doesn't know `type`
83
+ * (e.g. an IFC4X3-only class read out of an `IFC4` store).
84
+ *
85
+ * A caller that resolves a slot declared on a FIXED, verified-stable type —
86
+ * `IfcRoot.GlobalId` (slot 0 on every bundled schema), or a literal type
87
+ * token whose declared order was checked directly against all three
88
+ * `ENTITIES_*` tables — may omit `schema`: the union answers identically to
89
+ * a schema-specific lookup for those, and several call sites in
90
+ * `anonymize-placement.ts` and `anonymize-scrub.ts` do exactly that, each
91
+ * noting at the call site why its type is fixed rather than caller-supplied.
92
+ *
93
+ * `MutablePropertyView.setAttribute(id, name, value)` re-resolves `name` to a
94
+ * slot by its own lookup at STEP-serialize time
95
+ * (`step-attribute-mutations.ts`'s `applyAttributeMutations`), which now
96
+ * calls THIS function with the source entity's own `stepSourceSchema` too —
97
+ * so a `setAttribute` edit resolves the same slot this function would report
98
+ * for the same type/schema. `anonymize-scrub.ts` still writes through
99
+ * `MutablePropertyView.setPositionalAttribute(id, index, value)` with an
100
+ * `index` resolved here directly (#3309); that path needs no re-resolution
101
+ * at serialize time at all, so it stays the more direct choice for a caller
102
+ * that already has the index in hand.
103
+ */
104
+ export function attrIndex(type, name, schema) {
105
+ if (schema) {
106
+ const names = ATTRIBUTE_NAMES_BY_SCHEMA[schema].get(resolveEntityNameAlias(type).toUpperCase());
107
+ if (names)
108
+ return names.indexOf(name);
109
+ }
110
+ return getAttributeNamesAcrossSchemas(type).indexOf(name);
111
+ }
112
+ //# sourceMappingURL=subset-entity-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subset-entity-reader.js","sourceRoot":"","sources":["../src/subset-entity-reader.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE,sBAAsB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MAAM,EAAE,yBAAyB,CAAC,eAAe,CAAC;CACnD,CAAC;AAEF,SAAS,yBAAyB,CAAC,KAA+B;IAChE,MAAM,GAAG,GAAG,IAAI,GAAG,EAA6B,CAAC;IACjD,KAAK,MAAM,MAAM,IAAI,KAAK;QAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAClF,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,aAAiC;IAChE,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,MAAM,IAAI,aAAa,KAAK,QAAQ;QACzF,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAY,EAAE,MAAyB;IAC7E,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,KAAK,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAChG,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,8BAA8B,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,74 @@
1
+ import type { EffectiveEntityIndex } from './effective-index.js';
2
+ /**
3
+ * Every `IfcRoot` descendant across the three bundled schemas (IFC2X3, IFC4,
4
+ * IFC4X3), UPPERCASE — the set of types a subset export ever needs to
5
+ * classify as "included" or "excluded". `IfcRoot` itself is abstract and
6
+ * never instantiated, so it is not a member (same convention as
7
+ * `PRODUCT_TYPES` not containing `IFCPRODUCT`).
8
+ *
9
+ * Derived from the generated schema tables via `collectDescendantNames`
10
+ * rather than hand-listed, for the same reason `PRODUCT_TYPES` is: a
11
+ * hand-written list silently stops matching the schema the day it changes,
12
+ * and a subset export that fails to classify a genuinely-rooted entity type
13
+ * would either leak it (never excluded) or drop it (never includable) with
14
+ * no error.
15
+ */
16
+ export declare const IFC_ROOT_TYPES: ReadonlySet<string>;
17
+ /**
18
+ * Entity types that identify the SOURCE model or its authoring context
19
+ * rather than the geometry a bug reproduction needs — addresses and
20
+ * georeferencing. None of these are `IfcRoot` descendants (they carry no
21
+ * `GlobalId`), so `IFC_ROOT_TYPES` alone would never exclude them; a subset
22
+ * export must name them separately or a caller's included wall still drags
23
+ * its `IfcSite`'s `IfcPostalAddress` / `IfcMapConversion` chain along for the
24
+ * ride purely because nothing else in the closure competes for that #id.
25
+ *
26
+ * `IFCACTORROLE` is here for the same reason, one level removed: it hangs
27
+ * off `IfcPerson`/`IfcOrganization` (owner history), not off a spatial
28
+ * entity, but it is exactly as identifying — a role like "Structural
29
+ * Engineer, ACME Consulting" — and equally unreachable through
30
+ * `IFC_ROOT_TYPES`.
31
+ */
32
+ export declare const IDENTIFYING_TYPES: ReadonlySet<string>;
33
+ /** The subset of `IDENTIFYING_TYPES` the "Georeferencing & addresses" option
34
+ * governs. Dropping these while `removeGeoreferencing` is false left an
35
+ * `IfcSite` pointing at a `SiteAddress` line that was not written -- an
36
+ * invalid STEP file, reported with no warning, because the dangling-ref repair
37
+ * only rewrites `IFCREL*` lines and never sees a direct attribute slot (#3351).
38
+ *
39
+ * `IFCACTORROLE` is deliberately absent: it belongs to owner history, which
40
+ * this option does not govern, so it stays dropped unconditionally. */
41
+ export declare const GEOREFERENCE_TYPES: ReadonlySet<string>;
42
+ /** `IDENTIFYING_TYPES`, minus what the caller asked to keep. */
43
+ export declare function identifyingTypesFor(removeGeoreferencing: boolean): ReadonlySet<string>;
44
+ /** What a `subsetEntityIds` export needs from `step-collection.ts`'s closure tail. */
45
+ export interface SubsetEntityIds {
46
+ /** Seed set for `collectReferencedEntityIds`: infrastructure plus every
47
+ * caller-included id that actually exists in `index`. */
48
+ readonly roots: Set<number>;
49
+ /** Every `IfcRoot`/`IDENTIFYING_TYPES` id NOT in `includedIds` — passed as
50
+ * `pass.hiddenProductIds` so the existing `visibleOnly` dangling-ref
51
+ * protection (`evaluateOmissionPredicates` +
52
+ * `filterHiddenRefsFromRelationshipLine`) covers a subset export too. */
53
+ readonly excludedIds: Set<number>;
54
+ }
55
+ /**
56
+ * Classify every entity in `index` for a `subsetEntityIds` export: a root
57
+ * (infrastructure, always; or a caller-included id), an excluded id (an
58
+ * `IfcRoot`/identifying-type id the caller did NOT include), or neither (left
59
+ * to the forward closure walk to decide, same as `visibleOnly`'s "all other
60
+ * entity types" fallthrough).
61
+ *
62
+ * Runs over the EFFECTIVE index — `pass.effective`, not `dataStore` — for the
63
+ * same reason `getVisibleEntityIds` does: an overlay-created entity has no
64
+ * source record for a dataStore-only scan to find, a retyped entity must be
65
+ * classified by its new class, and a tombstoned one must not appear at all
66
+ * (`EffectiveEntityIndex` iteration already skips it).
67
+ */
68
+ export declare function getSubsetEntityIds(index: EffectiveEntityIndex, includedIds: ReadonlySet<number>,
69
+ /** Which identifying classes to exclude. Defaults to all of them, so the
70
+ * general STEP-collection path is unchanged; the anonymize path narrows it
71
+ * with `identifyingTypesFor` when the caller asked to keep georeferencing
72
+ * and addresses (#3351). */
73
+ identifying?: ReadonlySet<string>): SubsetEntityIds;
74
+ //# sourceMappingURL=subset-roots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subset-roots.d.ts","sourceRoot":"","sources":["../src/subset-roots.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAAoB,CAAC;AAUpE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAQhD,CAAC;AA8BH;;;;;;;wEAOwE;AACxE,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAGjD,CAAC;AAEH,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,oBAAoB,EAAE,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAGtF;AAED,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B;8DAC0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B;;;8EAG0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,oBAAoB,EAC3B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;AAChC;;;6BAG6B;AAC7B,WAAW,GAAE,WAAW,CAAC,MAAM,CAAqB,GACnD,eAAe,CA4CjB"}
@@ -0,0 +1,168 @@
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
+ * The root classification for a `subsetEntityIds` STEP export (#2934, the
6
+ * "anonymized isolated export" feature): which entities the caller's
7
+ * `includedIds` selection may legally seed, and which entities must be
8
+ * excluded outright regardless of whether the closure walk would otherwise
9
+ * reach them.
10
+ *
11
+ * Mirrors `reference-collector.ts`'s `getVisibleEntityIds` in shape — both
12
+ * produce a `{ roots, excludeIds }` pair `step-collection.ts` feeds to the
13
+ * same `collectReferencedEntityIds` + `collectStyleEntities` tail — but the
14
+ * classification rule is the opposite of `visibleOnly`'s. `visibleOnly`
15
+ * starts from "everything is a root unless hidden"; a subset export starts
16
+ * from "nothing is a root unless named", because the caller is picking a
17
+ * handful of entities out of a whole model, not hiding a handful out of it.
18
+ */
19
+ import { ENTITIES_IFC2X3, ENTITIES_IFC4, ENTITIES_IFC4X3, } from '@ifc-lite/data';
20
+ import { INFRASTRUCTURE_TYPES, collectDescendantNames } from './reference-collector.js';
21
+ /**
22
+ * Every `IfcRoot` descendant across the three bundled schemas (IFC2X3, IFC4,
23
+ * IFC4X3), UPPERCASE — the set of types a subset export ever needs to
24
+ * classify as "included" or "excluded". `IfcRoot` itself is abstract and
25
+ * never instantiated, so it is not a member (same convention as
26
+ * `PRODUCT_TYPES` not containing `IFCPRODUCT`).
27
+ *
28
+ * Derived from the generated schema tables via `collectDescendantNames`
29
+ * rather than hand-listed, for the same reason `PRODUCT_TYPES` is: a
30
+ * hand-written list silently stops matching the schema the day it changes,
31
+ * and a subset export that fails to classify a genuinely-rooted entity type
32
+ * would either leak it (never excluded) or drop it (never includable) with
33
+ * no error.
34
+ */
35
+ export const IFC_ROOT_TYPES = buildRootTypes();
36
+ function buildRootTypes() {
37
+ const roots = new Set();
38
+ for (const table of [ENTITIES_IFC2X3, ENTITIES_IFC4, ENTITIES_IFC4X3]) {
39
+ collectDescendantNames(table, 'IfcRoot', roots);
40
+ }
41
+ return roots;
42
+ }
43
+ /**
44
+ * Entity types that identify the SOURCE model or its authoring context
45
+ * rather than the geometry a bug reproduction needs — addresses and
46
+ * georeferencing. None of these are `IfcRoot` descendants (they carry no
47
+ * `GlobalId`), so `IFC_ROOT_TYPES` alone would never exclude them; a subset
48
+ * export must name them separately or a caller's included wall still drags
49
+ * its `IfcSite`'s `IfcPostalAddress` / `IfcMapConversion` chain along for the
50
+ * ride purely because nothing else in the closure competes for that #id.
51
+ *
52
+ * `IFCACTORROLE` is here for the same reason, one level removed: it hangs
53
+ * off `IfcPerson`/`IfcOrganization` (owner history), not off a spatial
54
+ * entity, but it is exactly as identifying — a role like "Structural
55
+ * Engineer, ACME Consulting" — and equally unreachable through
56
+ * `IFC_ROOT_TYPES`.
57
+ */
58
+ export const IDENTIFYING_TYPES = new Set([
59
+ 'IFCPOSTALADDRESS',
60
+ 'IFCTELECOMADDRESS',
61
+ 'IFCMAPCONVERSION',
62
+ 'IFCMAPCONVERSIONSCALED',
63
+ 'IFCPROJECTEDCRS',
64
+ 'IFCGEOGRAPHICCRS',
65
+ 'IFCACTORROLE',
66
+ ]);
67
+ /** The address half of `GEOREFERENCE_TYPES`. Every one of these is reached by
68
+ * a FORWARD attribute -- `IfcSite.SiteAddress`, `IfcBuilding.BuildingAddress`,
69
+ * `IfcPerson`/`IfcOrganization.Addresses` -- so "keep" means only "stop
70
+ * EXCLUDING them" and the closure walk from the included roots decides the
71
+ * rest. They must NOT be rooted: rooting is unconditional over the whole
72
+ * source model, so an address hanging off an EXCLUDED sibling site, or off
73
+ * owner history whose `Addresses` slot the scrub blanked, would be written
74
+ * verbatim into a file whose entire purpose is that it can be shared
75
+ * (#3351 review). */
76
+ const ADDRESS_TYPES = new Set([
77
+ 'IFCPOSTALADDRESS',
78
+ 'IFCTELECOMADDRESS',
79
+ ]);
80
+ /** The coordinate half of `GEOREFERENCE_TYPES`. Unlike the addresses above,
81
+ * nothing in the file forward-references these: `IfcCoordinateOperation`
82
+ * hangs off `IfcGeometricRepresentationContext` by an INVERSE attribute and
83
+ * the CRS records hang off it, so the closure cannot reach them and "keep"
84
+ * has to mean ROOT. They describe the model's placement on the earth rather
85
+ * than any one spatial entity, so rooting them is not the sibling-leak the
86
+ * addresses would be. */
87
+ const COORDINATE_REFERENCE_TYPES = new Set([
88
+ 'IFCMAPCONVERSION',
89
+ 'IFCMAPCONVERSIONSCALED',
90
+ 'IFCPROJECTEDCRS',
91
+ 'IFCGEOGRAPHICCRS',
92
+ ]);
93
+ /** The subset of `IDENTIFYING_TYPES` the "Georeferencing & addresses" option
94
+ * governs. Dropping these while `removeGeoreferencing` is false left an
95
+ * `IfcSite` pointing at a `SiteAddress` line that was not written -- an
96
+ * invalid STEP file, reported with no warning, because the dangling-ref repair
97
+ * only rewrites `IFCREL*` lines and never sees a direct attribute slot (#3351).
98
+ *
99
+ * `IFCACTORROLE` is deliberately absent: it belongs to owner history, which
100
+ * this option does not govern, so it stays dropped unconditionally. */
101
+ export const GEOREFERENCE_TYPES = new Set([
102
+ ...ADDRESS_TYPES,
103
+ ...COORDINATE_REFERENCE_TYPES,
104
+ ]);
105
+ /** `IDENTIFYING_TYPES`, minus what the caller asked to keep. */
106
+ export function identifyingTypesFor(removeGeoreferencing) {
107
+ if (removeGeoreferencing)
108
+ return IDENTIFYING_TYPES;
109
+ return new Set([...IDENTIFYING_TYPES].filter((t) => !GEOREFERENCE_TYPES.has(t)));
110
+ }
111
+ /**
112
+ * Classify every entity in `index` for a `subsetEntityIds` export: a root
113
+ * (infrastructure, always; or a caller-included id), an excluded id (an
114
+ * `IfcRoot`/identifying-type id the caller did NOT include), or neither (left
115
+ * to the forward closure walk to decide, same as `visibleOnly`'s "all other
116
+ * entity types" fallthrough).
117
+ *
118
+ * Runs over the EFFECTIVE index — `pass.effective`, not `dataStore` — for the
119
+ * same reason `getVisibleEntityIds` does: an overlay-created entity has no
120
+ * source record for a dataStore-only scan to find, a retyped entity must be
121
+ * classified by its new class, and a tombstoned one must not appear at all
122
+ * (`EffectiveEntityIndex` iteration already skips it).
123
+ */
124
+ export function getSubsetEntityIds(index, includedIds,
125
+ /** Which identifying classes to exclude. Defaults to all of them, so the
126
+ * general STEP-collection path is unchanged; the anonymize path narrows it
127
+ * with `identifyingTypesFor` when the caller asked to keep georeferencing
128
+ * and addresses (#3351). */
129
+ identifying = IDENTIFYING_TYPES) {
130
+ const roots = new Set();
131
+ const excludedIds = new Set();
132
+ for (const [expressId, entityRef] of index) {
133
+ const typeUpper = index.effectiveType(expressId, entityRef.type);
134
+ if (INFRASTRUCTURE_TYPES.has(typeUpper)) {
135
+ roots.add(expressId);
136
+ continue;
137
+ }
138
+ if (includedIds.has(expressId)) {
139
+ roots.add(expressId);
140
+ continue;
141
+ }
142
+ // A COORDINATE type the caller asked to KEEP has to be ROOTED, not merely
143
+ // left out of the exclusion set. `IfcCoordinateOperation` hangs off
144
+ // `IfcGeometricRepresentationContext` by an INVERSE attribute, so the
145
+ // forward closure never reaches it: not excluding it only meant it was
146
+ // dropped silently instead of deliberately, and the toggle named
147
+ // "Map conversion, CRS, lat/long, addresses" kept the last two (#3351).
148
+ //
149
+ // The ADDRESS types are deliberately not rooted here -- see
150
+ // `ADDRESS_TYPES`. They are forward-referenced, so dropping them out of
151
+ // `identifying` is already enough for an INCLUDED site's or building's
152
+ // address to survive the closure, while an excluded sibling site's stays
153
+ // unreachable. Rooting them would emit every address in the source model.
154
+ if (COORDINATE_REFERENCE_TYPES.has(typeUpper) && !identifying.has(typeUpper)) {
155
+ roots.add(expressId);
156
+ continue;
157
+ }
158
+ if (IFC_ROOT_TYPES.has(typeUpper) || identifying.has(typeUpper)) {
159
+ excludedIds.add(expressId);
160
+ }
161
+ // Everything else (geometry, relationships, property atoms, materials,
162
+ // …) is neither a root nor excluded here — the forward closure walk from
163
+ // `roots` decides whether it survives, exactly as `visibleOnly`'s
164
+ // fallthrough does.
165
+ }
166
+ return { roots, excludedIds };
167
+ }
168
+ //# sourceMappingURL=subset-roots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subset-roots.js","sourceRoot":"","sources":["../src/subset-roots.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAExF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,cAAc,EAAE,CAAC;AAEpE,SAAS,cAAc;IACrB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,CAAC,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC,EAAE,CAAC;QACtE,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAA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S,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAEjE,IAAI,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACxC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/B,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,0EAA0E;QAC1E,oEAAoE;QACpE,sEAAsE;QACtE,uEAAuE;QACvE,iEAAiE;QACjE,wEAAwE;QACxE,EAAE;QACF,4DAA4D;QAC5D,wEAAwE;QACxE,uEAAuE;QACvE,yEAAyE;QACzE,0EAA0E;QAC1E,IAAI,0BAA0B,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7E,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,IAAI,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAChE,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,uEAAuE;QACvE,yEAAyE;QACzE,kEAAkE;QAClE,oBAAoB;IACtB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC"}
@@ -29,6 +29,25 @@ export declare const HAS_PROPERTY_SETS_SLOT = 5;
29
29
  * answer it from the source buffer when the overlay owns the record.
30
30
  */
31
31
  export declare function isTypeClass(typeUpper: string | undefined): boolean;
32
+ /**
33
+ * Is this the class of an `IfcPropertySetDefinition` (`IfcPropertySet`,
34
+ * `IfcElementQuantity`, and any other schema-declared subtype)?
35
+ *
36
+ * From the cross-schema inheritance chain, the same way {@link isTypeClass}
37
+ * decides its own question and for the same reason: a hand-listed pair of
38
+ * names would need updating by hand the day a bundled schema adds another
39
+ * subtype, and would silently mis-handle it in the meantime (#3351 item 2 —
40
+ * an occurrence-owned pset reaching `exportAnonymizedSubset`'s `includedIds`
41
+ * directly, rather than through an `IfcTypeObject`'s `HasPropertySets`,
42
+ * which {@link isTypeClass} already governs).
43
+ *
44
+ * A class no bundled schema declares is treated as NOT a pset definition —
45
+ * the safe direction here is the opposite of `isTypeClass`'s: silently
46
+ * excluding an unrecognised class from a "drop unless kept" sweep would leak
47
+ * it, so an unknown class is left for the ordinary `IFC_ROOT_TYPES` handling
48
+ * to include or exclude on its own terms instead.
49
+ */
50
+ export declare function isPropertySetDefinitionClass(typeUpper: string | undefined): boolean;
32
51
  /**
33
52
  * The `HasPropertySets` list a type object should carry after export: the psets
34
53
  * it already had, with each affected one swapped for the replacement this export
@@ -1 +1 @@
1
- {"version":3,"file":"type-owned-psets.d.ts","sourceRoot":"","sources":["../src/type-owned-psets.ts"],"names":[],"mappings":"AAmBA,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAMxC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAOlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,EACtC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACxC,MAAM,EAAE,CAwBV;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEnE;AAED,4DAA4D;AAC5D,MAAM,WAA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;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,SAAS,MAAM,EAAE,GACjC,oBAAoB,CAStB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,GAC7C,MAAM,CAcR"}
@@ -57,6 +57,37 @@ export function isTypeClass(typeUpper) {
57
57
  typeObjectByClass.set(typeUpper, isTypeObject);
58
58
  return isTypeObject;
59
59
  }
60
+ /** class name → is it an `IfcPropertySetDefinition`. Same caching as
61
+ * {@link isTypeClass}, for the same reason. */
62
+ const psetDefinitionByClass = new Map();
63
+ /**
64
+ * Is this the class of an `IfcPropertySetDefinition` (`IfcPropertySet`,
65
+ * `IfcElementQuantity`, and any other schema-declared subtype)?
66
+ *
67
+ * From the cross-schema inheritance chain, the same way {@link isTypeClass}
68
+ * decides its own question and for the same reason: a hand-listed pair of
69
+ * names would need updating by hand the day a bundled schema adds another
70
+ * subtype, and would silently mis-handle it in the meantime (#3351 item 2 —
71
+ * an occurrence-owned pset reaching `exportAnonymizedSubset`'s `includedIds`
72
+ * directly, rather than through an `IfcTypeObject`'s `HasPropertySets`,
73
+ * which {@link isTypeClass} already governs).
74
+ *
75
+ * A class no bundled schema declares is treated as NOT a pset definition —
76
+ * the safe direction here is the opposite of `isTypeClass`'s: silently
77
+ * excluding an unrecognised class from a "drop unless kept" sweep would leak
78
+ * it, so an unknown class is left for the ordinary `IFC_ROOT_TYPES` handling
79
+ * to include or exclude on its own terms instead.
80
+ */
81
+ export function isPropertySetDefinitionClass(typeUpper) {
82
+ if (typeUpper === undefined)
83
+ return false;
84
+ const cached = psetDefinitionByClass.get(typeUpper);
85
+ if (cached !== undefined)
86
+ return cached;
87
+ const isPsetDefinition = getInheritanceChainAcrossSchemas(typeUpper).includes('IfcPropertySetDefinition');
88
+ psetDefinitionByClass.set(typeUpper, isPsetDefinition);
89
+ return isPsetDefinition;
90
+ }
60
91
  /**
61
92
  * The `HasPropertySets` list a type object should carry after export: the psets
62
93
  * it already had, with each affected one swapped for the replacement this export
@@ -1 +1 @@
1
- {"version":3,"file":"type-owned-psets.js","sourceRoot":"","sources":["../src/type-owned-psets.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,iFAAiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC;uDACuD;AACvD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,WAAW,CAAC,SAA6B;IACvD,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,YAAY,GAAG,gCAAgC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3F,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC/C,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CACrC,eAAkC,EAClC,iBAAsC,EACtC,kBAA+C,EAC/C,MAAyC;IAEzC,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/C,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,QAA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ize.ts"],"names":[],"mappings":"AAkFA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mFAAmF;IACnF,KAAK,EAAE,OAAO,CAAC;CAChB;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAMvE;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlD;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMxE;AAgBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CAYR;AAmDD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CA6DR;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKvF"}
1
+ {"version":3,"file":"unit-normalize.d.ts","sourceRoot":"","sources":["../src/unit-normalize.ts"],"names":[],"mappings":"AAkFA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mFAAmF;IACnF,KAAK,EAAE,OAAO,CAAC;CAChB;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAMvE;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlD;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMxE;AA0BD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CAYR;AAmDD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CA6DR;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKvF"}
@@ -52,7 +52,7 @@
52
52
  * - Angles, direction ratios, plain `IfcReal` ratios and counts — never typed as a
53
53
  * length/area/volume measure, so they are excluded automatically.
54
54
  */
55
- import { getAllAttributesForEntity } from '@ifc-lite/parser';
55
+ import { getAllAttributesForEntity, STEP_TRIVIA } from '@ifc-lite/parser';
56
56
  import { formatStepReal } from '@ifc-lite/data';
57
57
  import { splitTopLevelStepArguments } from './step-argument-parser.js';
58
58
  /** IFC defined types whose values are lengths (STEP writes them as bare reals). */
@@ -193,8 +193,16 @@ export function scaleNumberLiterals(text, factor) {
193
193
  * captured before the keyword and restored, so a keyword can never be matched as
194
194
  * the suffix of a longer identifier — without a lookbehind, which some engines
195
195
  * (older Safari) reject at construction time and would break importing this module.
196
+ *
197
+ * Trivia (whitespace and/or a `/* ... *​/` comment) between the keyword and
198
+ * `(` mirrors the entity/typed-value adjacency fix (packages/parser's
199
+ * entity-extractor, #3205's Rust counterpart, #3789 for the comment case): a
200
+ * STEP writer's line wrap or an inline comment can land there, and without
201
+ * tolerating it the wrapped literal was skipped by this rewriter, leaving
202
+ * the normalized file's other measures scaled but this one still in the
203
+ * source unit.
196
204
  */
197
- const TYPED_MEASURE_RE = /('(?:[^']|'')*')|(^|[^A-Za-z0-9_])(IFC(?:POSITIVE|NONNEGATIVE)?LENGTHMEASURE|IFCAREAMEASURE|IFCVOLUMEMEASURE)\(([^)]*)\)/gi;
205
+ const TYPED_MEASURE_RE = new RegExp(`('(?:[^']|'')*')|(^|[^A-Za-z0-9_])(IFC(?:POSITIVE|NONNEGATIVE)?LENGTHMEASURE|IFCAREAMEASURE|IFCVOLUMEMEASURE)${STEP_TRIVIA}\\(([^)]*)\\)`, 'gi');
198
206
  export function scaleTypedMeasures(text, lengthFactor, areaFactor, volumeFactor) {
199
207
  return text.replace(TYPED_MEASURE_RE, (full, str, delim, keyword, num) => {
200
208
  if (str !== undefined)
@@ -1 +1 @@
1
- {"version":3,"file":"unit-normalize.js","sourceRoot":"","sources":["../src/unit-normalize.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC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CAAC,SAAS,EAAE,CAAC;gBACjC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS;oBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;YACnF,CAAC;YACD,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,8EAA8E;IAC9E,kFAAkF;IAClF,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,YAAoB;IAC7E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QAAE,OAAO,CAAC,CAAC;IAC7E,IAAI,UAAU,IAAI,CAAC,IAAI,YAAY,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACnD,IAAI,UAAU,KAAK,YAAY;QAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,UAAU,GAAG,YAAY,CAAC;AACnC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifc-lite/export",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "Export formats for IFC-Lite",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,16 +16,16 @@
16
16
  "parquet-wasm": "^0.7.2",
17
17
  "apache-arrow": "^21.2.0",
18
18
  "jszip": "^3.10.0",
19
- "@ifc-lite/data": "^3.5.0",
20
- "@ifc-lite/encoding": "^2.1.0",
21
- "@ifc-lite/parser": "^4.3.2",
22
- "@ifc-lite/mutations": "^1.27.0",
23
- "@ifc-lite/geometry": "^4.1.0"
19
+ "@ifc-lite/geometry": "^4.2.0",
20
+ "@ifc-lite/data": "^4.0.0",
21
+ "@ifc-lite/encoding": "^2.2.0",
22
+ "@ifc-lite/parser": "^5.0.0",
23
+ "@ifc-lite/mutations": "^2.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "typescript": "^6.0.3",
27
- "vitest": "^4.1.10",
28
- "@ifc-lite/ifcx": "^3.0.1"
27
+ "vitest": "^4.1.11",
28
+ "@ifc-lite/ifcx": "^4.0.0"
29
29
  },
30
30
  "license": "MPL-2.0",
31
31
  "author": "Louis True",