@ifc-lite/data 3.4.1 → 3.5.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.
@@ -1,19 +1,27 @@
1
1
  /**
2
- * UPPERCASE → PascalCase entity name map
3
- * Originally generated from the @ifc-lite/codegen schema registry (IFC4X3).
2
+ * UPPERCASE STEP keyword -> PascalCase entity name.
4
3
  *
5
- * NOTE: `scripts/generate-entity-names.ts`, named by the original header here
6
- * as the way to regenerate this file, is NOT present in the repository - it is
7
- * referenced nowhere else. This table is therefore maintained BY HAND, and a
8
- * "just regenerate it" fix is not available. Four entries (IFCPROXY,
9
- * IFCSOLIDSTRATUM, IFCVOIDSTRATUM, IFCWATERSTRATUM) were absent while being
10
- * representable in `IfcTypeEnum`/`IfcTypeEnumToString` (types.ts), so every
11
- * caller doing `IFC_ENTITY_NAMES[upper] ?? upper` fell through to the raw
12
- * UPPERCASE string for them; they are added below and marked.
4
+ * GENERATED, not transcribed. This used to be a hand-maintained literal of 880
5
+ * entries whose header named a regenerator (`scripts/generate-entity-names.ts`)
6
+ * that has never existed in this repository; 282 keys the schema knows about
7
+ * were missing from it, including `IfcWallElementedCase`, `IfcBuildingElement`,
8
+ * `IfcDoorStyle` and every `*StandardCase` but `IfcWallStandardCase`, so every
9
+ * caller doing `IFC_ENTITY_NAMES[upper] ?? upper` displayed the raw UPPERCASE
10
+ * keyword for them. `scripts/emit-entity-names.ts` now writes the map from the
11
+ * `entities-*.ts` tables that `generate:ifc-schema` produces from the
12
+ * buildingSMART dumps, in the same command, so a schema bump carries the names
13
+ * along and there is no second list to fall behind.
13
14
  *
14
- * `ifc-entity-names.test.ts` pins the two tables against each other, so any
15
- * future drift - including a regeneration that drops entries again - fails
16
- * loudly instead of silently degrading display names.
15
+ * It is emitted as a literal rather than built at load from the `ENTITIES_*`
16
+ * arrays because a runtime loop over those is not tree-shakable: it would keep
17
+ * all three — ~630 KB minified, ~57 KB gzipped — in every bundle that touches a
18
+ * name lookup, and `@ifc-lite/data` is published for browser consumers.
19
+ *
20
+ * `ifc-entity-names.test.ts` pins the result against `IfcTypeEnum`, and
21
+ * `ifc-entity-names.schema-parity.test.ts` pins it against `entities-*.ts` in
22
+ * both directions and by name — so a stale generated file, the failure mode a
23
+ * committed artefact introduces, fails there rather than degrading display
24
+ * names silently.
17
25
  */
18
- export declare const IFC_ENTITY_NAMES: Record<string, string>;
26
+ export { IFC_ENTITY_NAMES } from './ifc-schema/generated/entity-names.js';
19
27
  //# sourceMappingURL=ifc-entity-names.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ifc-entity-names.d.ts","sourceRoot":"","sources":["../src/ifc-entity-names.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAq3BnD,CAAC"}
1
+ {"version":3,"file":"ifc-entity-names.d.ts","sourceRoot":"","sources":["../src/ifc-entity-names.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC"}