@ifc-lite/parser 5.2.0 → 6.2.1
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.
- package/dist/columnar-entity-preparation.d.ts +3 -0
- package/dist/columnar-entity-preparation.d.ts.map +1 -1
- package/dist/columnar-entity-preparation.js +101 -11
- package/dist/columnar-entity-preparation.js.map +1 -1
- package/dist/columnar-parser-indexes.d.ts +17 -1
- package/dist/columnar-parser-indexes.d.ts.map +1 -1
- package/dist/columnar-parser-indexes.js +31 -21
- package/dist/columnar-parser-indexes.js.map +1 -1
- package/dist/columnar-parser.d.ts +10 -1
- package/dist/columnar-parser.d.ts.map +1 -1
- package/dist/columnar-parser.js +14 -2
- package/dist/columnar-parser.js.map +1 -1
- package/dist/cost-extractor.d.ts +10 -0
- package/dist/cost-extractor.d.ts.map +1 -0
- package/dist/cost-extractor.js +369 -0
- package/dist/cost-extractor.js.map +1 -0
- package/dist/cost-schedule-2x3.d.ts +31 -0
- package/dist/cost-schedule-2x3.d.ts.map +1 -0
- package/dist/cost-schedule-2x3.js +75 -0
- package/dist/cost-schedule-2x3.js.map +1 -0
- package/dist/cost-types.d.ts +105 -0
- package/dist/cost-types.d.ts.map +1 -0
- package/dist/cost-types.js +5 -0
- package/dist/cost-types.js.map +1 -0
- package/dist/data-store-transport.d.ts +1 -0
- package/dist/data-store-transport.d.ts.map +1 -1
- package/dist/data-store-transport.js +5 -29
- package/dist/data-store-transport.js.map +1 -1
- package/dist/drop-census.d.ts +136 -0
- package/dist/drop-census.d.ts.map +1 -0
- package/dist/drop-census.js +53 -0
- package/dist/drop-census.js.map +1 -0
- package/dist/entity-scanner.d.ts.map +1 -1
- package/dist/entity-scanner.js +10 -5
- package/dist/entity-scanner.js.map +1 -1
- package/dist/generated/ifc2x3/schema-registry.d.ts +50 -0
- package/dist/generated/ifc2x3/schema-registry.d.ts.map +1 -0
- package/dist/generated/ifc2x3/schema-registry.js +50052 -0
- package/dist/generated/ifc2x3/schema-registry.js.map +1 -0
- package/dist/generated/ifc4x3/schema-registry.d.ts +50 -0
- package/dist/generated/ifc4x3/schema-registry.d.ts.map +1 -0
- package/dist/generated/ifc4x3/schema-registry.js +71299 -0
- package/dist/generated/ifc4x3/schema-registry.js.map +1 -0
- package/dist/generated/schema-registry-by-version.d.ts +61 -0
- package/dist/generated/schema-registry-by-version.d.ts.map +1 -0
- package/dist/generated/schema-registry-by-version.js +86 -0
- package/dist/generated/schema-registry-by-version.js.map +1 -0
- package/dist/georef-extractor.js +5 -5
- package/dist/georef-extractor.js.map +1 -1
- package/dist/group-assignment-factor.d.ts +13 -0
- package/dist/group-assignment-factor.d.ts.map +1 -0
- package/dist/group-assignment-factor.js +30 -0
- package/dist/group-assignment-factor.js.map +1 -0
- package/dist/ifczip.d.ts +7 -1
- package/dist/ifczip.d.ts.map +1 -1
- package/dist/ifczip.js +80 -14
- package/dist/ifczip.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/on-demand-extractors.d.ts +1 -0
- package/dist/on-demand-extractors.d.ts.map +1 -1
- package/dist/on-demand-extractors.js +2 -1
- package/dist/on-demand-extractors.js.map +1 -1
- package/dist/property-value-parser.d.ts +10 -0
- package/dist/property-value-parser.d.ts.map +1 -1
- package/dist/property-value-parser.js +40 -1
- package/dist/property-value-parser.js.map +1 -1
- package/dist/scan-entities-balanced.d.ts.map +1 -1
- package/dist/scan-entities-balanced.js +11 -6
- package/dist/scan-entities-balanced.js.map +1 -1
- package/dist/scan-worker-lexing.d.ts +14 -0
- package/dist/scan-worker-lexing.d.ts.map +1 -0
- package/dist/scan-worker-lexing.js +106 -0
- package/dist/scan-worker-lexing.js.map +1 -0
- package/dist/scan-worker-source.d.ts +1 -1
- package/dist/scan-worker-source.d.ts.map +1 -1
- package/dist/scan-worker-source.js +64 -59
- package/dist/scan-worker-source.js.map +1 -1
- package/dist/schedule-extractor.d.ts +2 -80
- package/dist/schedule-extractor.d.ts.map +1 -1
- package/dist/schedule-extractor.js +100 -225
- package/dist/schedule-extractor.js.map +1 -1
- package/dist/schedule-serializer-builders.d.ts +28 -0
- package/dist/schedule-serializer-builders.d.ts.map +1 -0
- package/dist/schedule-serializer-builders.js +163 -0
- package/dist/schedule-serializer-builders.js.map +1 -0
- package/dist/schedule-serializer.d.ts +6 -0
- package/dist/schedule-serializer.d.ts.map +1 -1
- package/dist/schedule-serializer.js +26 -165
- package/dist/schedule-serializer.js.map +1 -1
- package/dist/schedule-types.d.ts +211 -0
- package/dist/schedule-types.d.ts.map +1 -0
- package/dist/schedule-types.js +221 -0
- package/dist/schedule-types.js.map +1 -0
- package/dist/spatial-hierarchy-ambiguity.d.ts +39 -0
- package/dist/spatial-hierarchy-ambiguity.d.ts.map +1 -0
- package/dist/spatial-hierarchy-ambiguity.js +25 -0
- package/dist/spatial-hierarchy-ambiguity.js.map +1 -0
- package/dist/spatial-hierarchy-attributes.d.ts +54 -0
- package/dist/spatial-hierarchy-attributes.d.ts.map +1 -0
- package/dist/spatial-hierarchy-attributes.js +145 -0
- package/dist/spatial-hierarchy-attributes.js.map +1 -0
- package/dist/spatial-hierarchy-builder.d.ts +0 -30
- package/dist/spatial-hierarchy-builder.d.ts.map +1 -1
- package/dist/spatial-hierarchy-builder.js +45 -167
- package/dist/spatial-hierarchy-builder.js.map +1 -1
- package/dist/spatial-hierarchy-canonical-parent.d.ts +52 -2
- package/dist/spatial-hierarchy-canonical-parent.d.ts.map +1 -1
- package/dist/spatial-hierarchy-canonical-parent.js +153 -4
- package/dist/spatial-hierarchy-canonical-parent.js.map +1 -1
- package/dist/step-lexing.d.ts +1 -1
- package/dist/step-lexing.d.ts.map +1 -1
- package/dist/step-lexing.js +1 -56
- package/dist/step-lexing.js.map +1 -1
- package/dist/step-record-boundary.d.ts +28 -0
- package/dist/step-record-boundary.d.ts.map +1 -0
- package/dist/step-record-boundary.js +133 -0
- package/dist/step-record-boundary.js.map +1 -0
- package/dist/step-record-boundary.vectors.d.ts +102 -0
- package/dist/step-record-boundary.vectors.d.ts.map +1 -0
- package/dist/step-record-boundary.vectors.js +131 -0
- package/dist/step-record-boundary.vectors.js.map +1 -0
- package/dist/structural-extractor.d.ts +9 -0
- package/dist/structural-extractor.d.ts.map +1 -0
- package/dist/structural-extractor.js +310 -0
- package/dist/structural-extractor.js.map +1 -0
- package/dist/structural-load-extractor.d.ts +147 -0
- package/dist/structural-load-extractor.d.ts.map +1 -0
- package/dist/structural-load-extractor.js +178 -0
- package/dist/structural-load-extractor.js.map +1 -0
- package/dist/structural-step-values.d.ts +51 -0
- package/dist/structural-step-values.d.ts.map +1 -0
- package/dist/structural-step-values.js +109 -0
- package/dist/structural-step-values.js.map +1 -0
- package/dist/structural-types.d.ts +145 -0
- package/dist/structural-types.d.ts.map +1 -0
- package/dist/structural-types.js +5 -0
- package/dist/structural-types.js.map +1 -0
- package/dist/tokenizer.d.ts +11 -5
- package/dist/tokenizer.d.ts.map +1 -1
- package/dist/tokenizer.js +78 -21
- package/dist/tokenizer.js.map +1 -1
- package/dist/wasm-init-retry.d.ts +6 -42
- package/dist/wasm-init-retry.d.ts.map +1 -1
- package/dist/wasm-init-retry.js +6 -99
- package/dist/wasm-init-retry.js.map +1 -1
- package/dist/wasm-panic-forward.d.ts +7 -63
- package/dist/wasm-panic-forward.d.ts.map +1 -1
- package/dist/wasm-panic-forward.js +7 -100
- package/dist/wasm-panic-forward.js.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select the codegen-generated runtime schema registry by the model's
|
|
3
|
+
* `schemaVersion` (#4202).
|
|
4
|
+
*
|
|
5
|
+
* Before this file, `@ifc-lite/parser` exported exactly one
|
|
6
|
+
* {@link SchemaRegistry} — the IFC4 pin at `./schema-registry.js`, generated
|
|
7
|
+
* from `packages/codegen/schemas/IFC4_ADD2_TC1.exp`. A caller holding an
|
|
8
|
+
* IFC2X3 or IFC4X3 store had no per-version registry to ask: attribute
|
|
9
|
+
* EXPRESS types, optionality, enum/select domains and inheritance chains for
|
|
10
|
+
* those two schemas existed nowhere in this repo (the IFC2X3 table in
|
|
11
|
+
* `@ifc-lite/data` carries attribute NAMES only, vendored from
|
|
12
|
+
* `SchemaInfo.*.g.cs`, not EXPRESS types).
|
|
13
|
+
*
|
|
14
|
+
* `./ifc4x3/schema-registry.ts` and `./ifc2x3/schema-registry.ts` are the
|
|
15
|
+
* same codegen output as the IFC4 mirror at `./schema-registry.ts` — copied
|
|
16
|
+
* byte-for-byte from `packages/codegen/generated/{ifc4x3,ifc2x3}/
|
|
17
|
+
* schema-registry.ts` (`scripts/check-codegen-sync.mjs` regenerates all
|
|
18
|
+
* three from their committed `.exp` sources and fails CI if a copy has
|
|
19
|
+
* drifted). Only `schema-registry.ts` is mirrored per non-IFC4 version, not
|
|
20
|
+
* the full `entities.ts` / `types.ts` / `enums.ts` / `selects.ts` compile-time
|
|
21
|
+
* interface set — three copies of those under one flat `./generated`
|
|
22
|
+
* directory would redeclare the same TypeScript type names (`IfcWall`, …)
|
|
23
|
+
* for classes shared across schemas. The IFC4 mirror keeps its full
|
|
24
|
+
* compile-time surface (`export * from` in `./index.ts`) because it is the
|
|
25
|
+
* package's existing public API; this file adds only the runtime metadata
|
|
26
|
+
* needed to answer "what does entity X look like in schema Y" for the other
|
|
27
|
+
* two.
|
|
28
|
+
*
|
|
29
|
+
* The IFC4 answer is unchanged: `getSchemaRegistryForVersion('IFC4')`
|
|
30
|
+
* returns the exact `SCHEMA_REGISTRY` object already exported from
|
|
31
|
+
* `./schema-registry.js`, so every existing caller of that export keeps its
|
|
32
|
+
* byte-identical answer.
|
|
33
|
+
*/
|
|
34
|
+
import { type SchemaRegistry } from './schema-registry.js';
|
|
35
|
+
export type { SchemaRegistry };
|
|
36
|
+
/** The schema versions a codegen-generated runtime registry exists for. */
|
|
37
|
+
export type SchemaVersionWithRegistry = 'IFC2X3' | 'IFC4' | 'IFC4X3';
|
|
38
|
+
/**
|
|
39
|
+
* Look up the codegen-generated runtime registry for a model's schema
|
|
40
|
+
* version.
|
|
41
|
+
*
|
|
42
|
+
* Fails loud rather than answering an empty registry: a registry whose
|
|
43
|
+
* `entities` map has zero keys means the generator did not run against that
|
|
44
|
+
* schema (an unreachable `.exp` file, a build that skipped codegen, …), not
|
|
45
|
+
* that the schema legitimately declares no entities — no bundled IFC schema
|
|
46
|
+
* does. Silently returning that empty object would look identical to "this
|
|
47
|
+
* class genuinely isn't in the schema" to every caller, which is exactly the
|
|
48
|
+
* failure mode `packages/codegen/schemas/` had for IFC2X3 before this file
|
|
49
|
+
* existed (see module doc). Callers that need "unknown version" to be a
|
|
50
|
+
* normal, handled case should check {@link SchemaVersionWithRegistry}
|
|
51
|
+
* membership themselves before calling.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getSchemaRegistryForVersion(version: SchemaVersionWithRegistry): SchemaRegistry;
|
|
54
|
+
/**
|
|
55
|
+
* The zero-entities guard, factored out so a test can exercise it against a
|
|
56
|
+
* synthetic empty registry without needing a generator run that actually
|
|
57
|
+
* produces one. Not exported for general use — go through
|
|
58
|
+
* {@link getSchemaRegistryForVersion}.
|
|
59
|
+
*/
|
|
60
|
+
export declare function assertNonEmptyRegistry(registry: SchemaRegistry, version: SchemaVersionWithRegistry): SchemaRegistry;
|
|
61
|
+
//# sourceMappingURL=schema-registry-by-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-registry-by-version.d.ts","sourceRoot":"","sources":["../../src/generated/schema-registry-by-version.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIpG,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,2EAA2E;AAC3E,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAQrE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,yBAAyB,GAAG,cAAc,CAS9F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,yBAAyB,GACjC,cAAc,CAahB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
* Select the codegen-generated runtime schema registry by the model's
|
|
6
|
+
* `schemaVersion` (#4202).
|
|
7
|
+
*
|
|
8
|
+
* Before this file, `@ifc-lite/parser` exported exactly one
|
|
9
|
+
* {@link SchemaRegistry} — the IFC4 pin at `./schema-registry.js`, generated
|
|
10
|
+
* from `packages/codegen/schemas/IFC4_ADD2_TC1.exp`. A caller holding an
|
|
11
|
+
* IFC2X3 or IFC4X3 store had no per-version registry to ask: attribute
|
|
12
|
+
* EXPRESS types, optionality, enum/select domains and inheritance chains for
|
|
13
|
+
* those two schemas existed nowhere in this repo (the IFC2X3 table in
|
|
14
|
+
* `@ifc-lite/data` carries attribute NAMES only, vendored from
|
|
15
|
+
* `SchemaInfo.*.g.cs`, not EXPRESS types).
|
|
16
|
+
*
|
|
17
|
+
* `./ifc4x3/schema-registry.ts` and `./ifc2x3/schema-registry.ts` are the
|
|
18
|
+
* same codegen output as the IFC4 mirror at `./schema-registry.ts` — copied
|
|
19
|
+
* byte-for-byte from `packages/codegen/generated/{ifc4x3,ifc2x3}/
|
|
20
|
+
* schema-registry.ts` (`scripts/check-codegen-sync.mjs` regenerates all
|
|
21
|
+
* three from their committed `.exp` sources and fails CI if a copy has
|
|
22
|
+
* drifted). Only `schema-registry.ts` is mirrored per non-IFC4 version, not
|
|
23
|
+
* the full `entities.ts` / `types.ts` / `enums.ts` / `selects.ts` compile-time
|
|
24
|
+
* interface set — three copies of those under one flat `./generated`
|
|
25
|
+
* directory would redeclare the same TypeScript type names (`IfcWall`, …)
|
|
26
|
+
* for classes shared across schemas. The IFC4 mirror keeps its full
|
|
27
|
+
* compile-time surface (`export * from` in `./index.ts`) because it is the
|
|
28
|
+
* package's existing public API; this file adds only the runtime metadata
|
|
29
|
+
* needed to answer "what does entity X look like in schema Y" for the other
|
|
30
|
+
* two.
|
|
31
|
+
*
|
|
32
|
+
* The IFC4 answer is unchanged: `getSchemaRegistryForVersion('IFC4')`
|
|
33
|
+
* returns the exact `SCHEMA_REGISTRY` object already exported from
|
|
34
|
+
* `./schema-registry.js`, so every existing caller of that export keeps its
|
|
35
|
+
* byte-identical answer.
|
|
36
|
+
*/
|
|
37
|
+
import { SCHEMA_REGISTRY as SCHEMA_REGISTRY_IFC4 } from './schema-registry.js';
|
|
38
|
+
import { SCHEMA_REGISTRY as SCHEMA_REGISTRY_IFC4X3 } from './ifc4x3/schema-registry.js';
|
|
39
|
+
import { SCHEMA_REGISTRY as SCHEMA_REGISTRY_IFC2X3 } from './ifc2x3/schema-registry.js';
|
|
40
|
+
const REGISTRIES_BY_VERSION = {
|
|
41
|
+
IFC2X3: SCHEMA_REGISTRY_IFC2X3,
|
|
42
|
+
IFC4: SCHEMA_REGISTRY_IFC4,
|
|
43
|
+
IFC4X3: SCHEMA_REGISTRY_IFC4X3,
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Look up the codegen-generated runtime registry for a model's schema
|
|
47
|
+
* version.
|
|
48
|
+
*
|
|
49
|
+
* Fails loud rather than answering an empty registry: a registry whose
|
|
50
|
+
* `entities` map has zero keys means the generator did not run against that
|
|
51
|
+
* schema (an unreachable `.exp` file, a build that skipped codegen, …), not
|
|
52
|
+
* that the schema legitimately declares no entities — no bundled IFC schema
|
|
53
|
+
* does. Silently returning that empty object would look identical to "this
|
|
54
|
+
* class genuinely isn't in the schema" to every caller, which is exactly the
|
|
55
|
+
* failure mode `packages/codegen/schemas/` had for IFC2X3 before this file
|
|
56
|
+
* existed (see module doc). Callers that need "unknown version" to be a
|
|
57
|
+
* normal, handled case should check {@link SchemaVersionWithRegistry}
|
|
58
|
+
* membership themselves before calling.
|
|
59
|
+
*/
|
|
60
|
+
export function getSchemaRegistryForVersion(version) {
|
|
61
|
+
const registry = REGISTRIES_BY_VERSION[version];
|
|
62
|
+
if (registry === undefined) {
|
|
63
|
+
throw new Error(`getSchemaRegistryForVersion(${JSON.stringify(version)}): no codegen-generated registry exists for ` +
|
|
64
|
+
`this schema version. Supported versions: ${Object.keys(REGISTRIES_BY_VERSION).join(', ')}.`);
|
|
65
|
+
}
|
|
66
|
+
return assertNonEmptyRegistry(registry, version);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The zero-entities guard, factored out so a test can exercise it against a
|
|
70
|
+
* synthetic empty registry without needing a generator run that actually
|
|
71
|
+
* produces one. Not exported for general use — go through
|
|
72
|
+
* {@link getSchemaRegistryForVersion}.
|
|
73
|
+
*/
|
|
74
|
+
export function assertNonEmptyRegistry(registry, version) {
|
|
75
|
+
const entityCount = Object.keys(registry.entities).length;
|
|
76
|
+
if (entityCount === 0) {
|
|
77
|
+
throw new Error(`getSchemaRegistryForVersion(${JSON.stringify(version)}): the codegen-generated registry has zero ` +
|
|
78
|
+
'entities. This means the generator did not run (or ran against an unreachable/empty schema file) ' +
|
|
79
|
+
'rather than that the schema has no entities — no bundled IFC schema does. Regenerate with ' +
|
|
80
|
+
'`pnpm --filter @ifc-lite/codegen run generate:' +
|
|
81
|
+
version.toLowerCase() +
|
|
82
|
+
'` and re-copy into packages/parser/src/generated.');
|
|
83
|
+
}
|
|
84
|
+
return registry;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=schema-registry-by-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-registry-by-version.js","sourceRoot":"","sources":["../../src/generated/schema-registry-by-version.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CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/georef-extractor.js
CHANGED
|
@@ -111,12 +111,12 @@ function isNegativeComponent(n) {
|
|
|
111
111
|
function compoundPlaneAngleToDecimalDegrees(value) {
|
|
112
112
|
if (!Array.isArray(value) || value.length < 3)
|
|
113
113
|
return undefined;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (
|
|
114
|
+
// Read BY POSITION and refuse the whole angle on a non-numeric component, as
|
|
115
|
+
// the Rust twin does: dropping non-numbers first read ($,51,30,0) as 51°30'.
|
|
116
|
+
const parts = [...value.slice(0, 3), value.length > 3 ? value[3] : 0].map((entry) => getNumber(entry));
|
|
117
|
+
if (!parts.every((part) => part !== undefined))
|
|
118
118
|
return undefined;
|
|
119
|
-
const [degreesRaw, minutesRaw, secondsRaw, millionthsRaw
|
|
119
|
+
const [degreesRaw, minutesRaw, secondsRaw, millionthsRaw] = parts;
|
|
120
120
|
const sign = isNegativeComponent(degreesRaw) ||
|
|
121
121
|
isNegativeComponent(minutesRaw) ||
|
|
122
122
|
isNegativeComponent(secondsRaw) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"georef-extractor.js","sourceRoot":"","sources":["../src/georef-extractor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,yEAAyE;AACzE,wEAAwE;AACxE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAmB/B,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MA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{ IfcDataStore } from './columnar-parser.js';
|
|
2
|
+
/**
|
|
3
|
+
* The proportional `Factor` of a group/zone member assigned through
|
|
4
|
+
* `IfcRelAssignsToGroupByFactor`, or `undefined` for a plain
|
|
5
|
+
* `IfcRelAssignsToGroup` assignment (no `Factor` attribute) or no
|
|
6
|
+
* assignment at all. The edge itself carries no attribute payload, so this
|
|
7
|
+
* resolves the edge's `relationshipId` under the distinct
|
|
8
|
+
* {@link RelationshipType.AssignsToGroupByFactor} bucket and reads `Factor`
|
|
9
|
+
* off that (already-queryable) relationship entity via
|
|
10
|
+
* {@link extractAllEntityAttributes} (#4205).
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractGroupAssignmentFactorOnDemand(store: IfcDataStore, groupId: number, memberId: number): number | undefined;
|
|
13
|
+
//# sourceMappingURL=group-assignment-factor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-assignment-factor.d.ts","sourceRoot":"","sources":["../src/group-assignment-factor.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;;;;;;;;GASG;AACH,wBAAgB,oCAAoC,CAChD,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAUpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { RelationshipType } from '@ifc-lite/data';
|
|
5
|
+
import { extractAllEntityAttributes } from './columnar-parser-root-attributes.js';
|
|
6
|
+
/**
|
|
7
|
+
* The proportional `Factor` of a group/zone member assigned through
|
|
8
|
+
* `IfcRelAssignsToGroupByFactor`, or `undefined` for a plain
|
|
9
|
+
* `IfcRelAssignsToGroup` assignment (no `Factor` attribute) or no
|
|
10
|
+
* assignment at all. The edge itself carries no attribute payload, so this
|
|
11
|
+
* resolves the edge's `relationshipId` under the distinct
|
|
12
|
+
* {@link RelationshipType.AssignsToGroupByFactor} bucket and reads `Factor`
|
|
13
|
+
* off that (already-queryable) relationship entity via
|
|
14
|
+
* {@link extractAllEntityAttributes} (#4205).
|
|
15
|
+
*/
|
|
16
|
+
export function extractGroupAssignmentFactorOnDemand(store, groupId, memberId) {
|
|
17
|
+
if (!store.relationships)
|
|
18
|
+
return undefined;
|
|
19
|
+
const edges = store.relationships.forward.getEdges(groupId, RelationshipType.AssignsToGroupByFactor);
|
|
20
|
+
for (const edge of edges) {
|
|
21
|
+
if (edge.target !== memberId)
|
|
22
|
+
continue;
|
|
23
|
+
const attrs = extractAllEntityAttributes(store, edge.relationshipId);
|
|
24
|
+
const factorAttr = attrs.find((a) => a.name === 'Factor');
|
|
25
|
+
if (factorAttr && typeof factorAttr.value === 'number')
|
|
26
|
+
return factorAttr.value;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=group-assignment-factor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-assignment-factor.js","sourceRoot":"","sources":["../src/group-assignment-factor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,UAAU,oCAAoC,CAChD,KAAmB,EACnB,OAAe,EACf,QAAgB;IAEhB,IAAI,CAAC,KAAK,CAAC,aAAa;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IACrG,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ;YAAE,SAAS;QACvC,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACrE,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QAC1D,IAAI,UAAU,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ;YAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
package/dist/ifczip.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export interface IfcZipContents {
|
|
|
31
31
|
* versa). Empty for non-zip input and archives without images.
|
|
32
32
|
*/
|
|
33
33
|
resources: Map<string, Uint8Array>;
|
|
34
|
+
/** Original archive paths, sharing the same bytes as basename aliases. */
|
|
35
|
+
originalResources: Map<string, Uint8Array>;
|
|
36
|
+
/** Preserve this entry path when exporting relative texture references. */
|
|
37
|
+
modelPath?: string;
|
|
38
|
+
/** At least one raster entry was omitted by extraction budgets. */
|
|
39
|
+
resourcesIncomplete: boolean;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
42
|
* `unwrapIfcZip` variant that ALSO extracts sibling raster images (#1781) —
|
|
@@ -39,7 +45,7 @@ export interface IfcZipContents {
|
|
|
39
45
|
* `.ifcZIP`). Non-zip input returns unchanged bytes and an empty map, so
|
|
40
46
|
* callers can invoke this unconditionally like `unwrapIfcZip`.
|
|
41
47
|
*/
|
|
42
|
-
export declare function unwrapIfcZipWithResources(buffer: ArrayBuffer): Promise<IfcZipContents>;
|
|
48
|
+
export declare function unwrapIfcZipWithResources(buffer: ArrayBuffer, maxModelBytes?: number): Promise<IfcZipContents>;
|
|
43
49
|
/**
|
|
44
50
|
* `unwrapIfcZip` for a Node `Buffer`/`Uint8Array` view (CLI/MCP loaders):
|
|
45
51
|
* handles the ArrayBuffer-slice dance for a view that may not span its whole
|
package/dist/ifczip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifczip.d.ts","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAuBA,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAGxD;AAwDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAE5E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,WAAW,EACnB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"ifczip.d.ts","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAuBA,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAGxD;AAwDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAE5E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,WAAW,EACnB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,WAAW,CAAC,CAKtB;AAuBD,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,KAAK,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,0EAA0E;IAC1E,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,WAAW,EACnB,aAAa,GAAE,MAA+B,GAC7C,OAAO,CAAC,cAAc,CAAC,CAsCzB;AAiGD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA0B7E"}
|
package/dist/ifczip.js
CHANGED
|
@@ -96,7 +96,8 @@ export async function unwrapIfcZipWithLimit(buffer, maxUncompressedBytes) {
|
|
|
96
96
|
if (!isZipBuffer(buffer))
|
|
97
97
|
return buffer;
|
|
98
98
|
const { entry } = await openZipModelEntry(buffer, maxUncompressedBytes);
|
|
99
|
-
|
|
99
|
+
const bytes = await extractEntryWithLimit(entry, maxUncompressedBytes);
|
|
100
|
+
return bytes.buffer;
|
|
100
101
|
}
|
|
101
102
|
/** Sibling raster-image entries `IfcImageTexture.URLReference` can point at. */
|
|
102
103
|
const IMAGE_ENTRY_RE = /\.(png|jpe?g)$/i;
|
|
@@ -123,38 +124,103 @@ const MAX_IMAGE_ENTRIES = 256;
|
|
|
123
124
|
* `.ifcZIP`). Non-zip input returns unchanged bytes and an empty map, so
|
|
124
125
|
* callers can invoke this unconditionally like `unwrapIfcZip`.
|
|
125
126
|
*/
|
|
126
|
-
export async function unwrapIfcZipWithResources(buffer) {
|
|
127
|
+
export async function unwrapIfcZipWithResources(buffer, maxModelBytes = MAX_UNCOMPRESSED_BYTES) {
|
|
127
128
|
if (!isZipBuffer(buffer))
|
|
128
|
-
return { model: buffer, resources: new Map() };
|
|
129
|
-
const { zip, entry } = await openZipModelEntry(buffer,
|
|
129
|
+
return { model: buffer, resources: new Map(), originalResources: new Map(), resourcesIncomplete: false };
|
|
130
|
+
const { zip, entry } = await openZipModelEntry(buffer, maxModelBytes);
|
|
131
|
+
const modelBytes = await extractEntryWithLimit(entry, maxModelBytes);
|
|
132
|
+
const model = modelBytes.buffer;
|
|
130
133
|
const resources = new Map();
|
|
134
|
+
const originalResources = new Map();
|
|
131
135
|
let totalImageBytes = 0;
|
|
136
|
+
let resourcesIncomplete = false;
|
|
132
137
|
for (const res of Object.values(zip.files)) {
|
|
133
138
|
if (res.dir || !IMAGE_ENTRY_RE.test(res.name))
|
|
134
139
|
continue;
|
|
135
|
-
if (
|
|
140
|
+
if (originalResources.size >= MAX_IMAGE_ENTRIES) {
|
|
141
|
+
resourcesIncomplete = true;
|
|
136
142
|
break;
|
|
143
|
+
}
|
|
137
144
|
const size = declaredUncompressedSize(res);
|
|
138
|
-
if (typeof size === 'number' && size > MAX_IMAGE_BYTES)
|
|
145
|
+
if (typeof size === 'number' && size > MAX_IMAGE_BYTES) {
|
|
146
|
+
resourcesIncomplete = true;
|
|
139
147
|
continue;
|
|
148
|
+
}
|
|
140
149
|
const basename = res.name.split('/').pop()?.toLowerCase();
|
|
141
150
|
if (!basename)
|
|
142
151
|
continue;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
152
|
+
const remaining = MAX_TOTAL_IMAGE_BYTES - totalImageBytes;
|
|
153
|
+
let bytes;
|
|
154
|
+
try {
|
|
155
|
+
bytes = await extractEntryWithLimit(res, Math.min(MAX_IMAGE_BYTES, remaining));
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (!(error instanceof ZipEntryLimitError))
|
|
159
|
+
throw error;
|
|
160
|
+
resourcesIncomplete = true;
|
|
161
|
+
if (remaining <= MAX_IMAGE_BYTES)
|
|
162
|
+
break;
|
|
146
163
|
continue;
|
|
147
|
-
|
|
164
|
+
}
|
|
148
165
|
// Enforce the aggregate budget on REAL decompressed sizes (the central-
|
|
149
166
|
// directory declaration is advisory and absent on some writers).
|
|
150
|
-
if (bytes.byteLength > MAX_IMAGE_BYTES)
|
|
167
|
+
if (bytes.byteLength > MAX_IMAGE_BYTES) {
|
|
168
|
+
resourcesIncomplete = true;
|
|
151
169
|
continue;
|
|
152
|
-
|
|
170
|
+
}
|
|
171
|
+
if (totalImageBytes + bytes.byteLength > MAX_TOTAL_IMAGE_BYTES) {
|
|
172
|
+
resourcesIncomplete = true;
|
|
153
173
|
break;
|
|
174
|
+
}
|
|
154
175
|
totalImageBytes += bytes.byteLength;
|
|
155
|
-
|
|
176
|
+
originalResources.set(res.name, bytes);
|
|
177
|
+
// Preserve basename first-wins compatibility, retaining every original.
|
|
178
|
+
if (!resources.has(basename))
|
|
179
|
+
resources.set(basename, bytes);
|
|
156
180
|
}
|
|
157
|
-
return { model:
|
|
181
|
+
return { model, resources, originalResources, modelPath: entry.name, resourcesIncomplete };
|
|
182
|
+
}
|
|
183
|
+
class ZipEntryLimitError extends Error {
|
|
184
|
+
}
|
|
185
|
+
/** Inflate incrementally so falsified ZIP metadata cannot bypass the limit. */
|
|
186
|
+
function extractEntryWithLimit(entry, limit) {
|
|
187
|
+
return new Promise((resolve, reject) => {
|
|
188
|
+
const chunks = [];
|
|
189
|
+
let total = 0;
|
|
190
|
+
let settled = false;
|
|
191
|
+
// `internalStream` is JSZip's browser streaming API but is omitted from
|
|
192
|
+
// the package's public TypeScript declaration.
|
|
193
|
+
const stream = entry.internalStream('uint8array');
|
|
194
|
+
stream.on('data', (chunk) => {
|
|
195
|
+
if (settled)
|
|
196
|
+
return;
|
|
197
|
+
total += chunk.byteLength;
|
|
198
|
+
if (total > limit) {
|
|
199
|
+
settled = true;
|
|
200
|
+
stream.pause();
|
|
201
|
+
reject(new ZipEntryLimitError(`This .ifcZIP archive's extracted entry "${entry.name}" exceeds the ${(limit / (1024 * 1024)).toFixed(0)} MiB limit.`));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
chunks.push(chunk);
|
|
205
|
+
});
|
|
206
|
+
stream.on('error', (error) => { if (!settled) {
|
|
207
|
+
settled = true;
|
|
208
|
+
reject(error);
|
|
209
|
+
} });
|
|
210
|
+
stream.on('end', () => {
|
|
211
|
+
if (settled)
|
|
212
|
+
return;
|
|
213
|
+
settled = true;
|
|
214
|
+
const output = new Uint8Array(total);
|
|
215
|
+
let offset = 0;
|
|
216
|
+
for (const chunk of chunks) {
|
|
217
|
+
output.set(chunk, offset);
|
|
218
|
+
offset += chunk.byteLength;
|
|
219
|
+
}
|
|
220
|
+
resolve(output);
|
|
221
|
+
});
|
|
222
|
+
stream.resume();
|
|
223
|
+
});
|
|
158
224
|
}
|
|
159
225
|
/** JSZip's central-directory uncompressed size — internal field, so read
|
|
160
226
|
* defensively: a future JSZip dropping it just skips the size guard. */
|
package/dist/ifczip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifczip.js","sourceRoot":"","sources":["../src/ifczip.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;8EAC8E;AAC9E,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,wEAAwE;AACxE,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,IAAI,MAAM,CAAC,UAAU,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,SAAS,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,IAAgB;IACjC,OAAO,CACL,IAAI,CAAC,UAAU,IAAI,CAAC;QACpB,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM;QAC1B,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM;QAC1B,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAChB,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CACjB,CAAC;AACJ,CAAC;AAED,wEAAwE;AACxE,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,4EAA4E;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AoB;IACpB,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CACnC,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CACnB,CAAC;IACjB,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type { IfcSourceBytes, IfcSourceTransfer } from './source-bytes.js';
|
|
|
11
11
|
export { CompactEntityIndex, CompactEntityIndexBuilder, buildCompactEntityIndex } from './compact-entity-index.js';
|
|
12
12
|
export { scanIfcEntities } from './entity-scanner.js';
|
|
13
13
|
export type { EntityScanPath, EntityScanResult, PreScannedEntityIndex, WasmScanApi } from './entity-scanner.js';
|
|
14
|
-
export { REL_TYPE_MAP,
|
|
14
|
+
export { REL_TYPE_MAP, isIfcTypeLikeEntity } from './columnar-parser-indexes.js';
|
|
15
15
|
export { IFC_SUBTYPES, expandTypes, QUERY_REL_TYPE_MAP } from './query-backend-maps.js';
|
|
16
16
|
export { PropertyExtractor } from './property-extractor.js';
|
|
17
17
|
export { QuantityExtractor } from './quantity-extractor.js';
|
|
@@ -21,20 +21,25 @@ export { extractLengthUnitScale, resolveEntityLengthUnitScale, resolveOwningIfcP
|
|
|
21
21
|
export { extractProjectUnits, measureUnit, ProjectUnits, type ResolvedUnit, type MeasureUnit, } from './project-units.js';
|
|
22
22
|
export { quantitySiScale } from './quantity-collect.js';
|
|
23
23
|
export { scaleMeasureValue, scaledPropertyValue, roundToScale } from './measure-unit-scale.js';
|
|
24
|
-
export { ColumnarParser, type IfcDataStore, type EntityByIdIndex, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractEntityAttributesOnDemand, extractAllEntityAttributes, getRawNamedAttributes, extractRootAttributesFromEntity, extractClassificationsOnDemand, extractClassificationSystemsOnDemand, extractMaterialsOnDemand, extractAllMaterialsOnDemand, extractMaterialPropertiesOnDemand, extractMaterialPropertiesForMaterialId, resolveMaterialDefId, resolveAllMaterialDefIds, collectMaterialLeaves, buildMaterialUsageIndex, getMaterialDisplay, extractTypePropertiesOnDemand, extractTypeEntityOwnProperties, extractTypeQuantitiesOnDemand, mergeInheritedPropertySets, mergeInheritedQuantitySets, extractDocumentsOnDemand, extractRelationshipsOnDemand, extractGroupMembersOnDemand, extractGeoreferencingOnDemand, type ClassificationInfo, type ClassificationSystemNames, type MaterialInfo, type MaterialLayerInfo, type MaterialProfileInfo, type MaterialConstituentInfo, type MaterialPsetGroup, type MaterialLeaf, type MaterialUsage, type TypePropertyInfo, type TypeQuantityInfo, type DocumentInfo, type EntityRelationships, type GroupMember } from './columnar-parser.js';
|
|
24
|
+
export { ColumnarParser, type IfcDataStore, type EntityByIdIndex, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractEntityAttributesOnDemand, extractAllEntityAttributes, getRawNamedAttributes, extractRootAttributesFromEntity, extractClassificationsOnDemand, extractClassificationSystemsOnDemand, extractMaterialsOnDemand, extractAllMaterialsOnDemand, extractMaterialPropertiesOnDemand, extractMaterialPropertiesForMaterialId, resolveMaterialDefId, resolveAllMaterialDefIds, collectMaterialLeaves, buildMaterialUsageIndex, getMaterialDisplay, extractTypePropertiesOnDemand, extractTypeEntityOwnProperties, extractTypeQuantitiesOnDemand, mergeInheritedPropertySets, mergeInheritedQuantitySets, extractDocumentsOnDemand, extractRelationshipsOnDemand, extractGroupMembersOnDemand, extractGroupAssignmentFactorOnDemand, extractGeoreferencingOnDemand, type ClassificationInfo, type ClassificationSystemNames, type MaterialInfo, type MaterialLayerInfo, type MaterialProfileInfo, type MaterialConstituentInfo, type MaterialPsetGroup, type MaterialLeaf, type MaterialUsage, type TypePropertyInfo, type TypeQuantityInfo, type DocumentInfo, type EntityRelationships, type GroupMember } from './columnar-parser.js';
|
|
25
25
|
export type { IfcStoreBase, IfcSourceHeader, SpatialHierarchy, EntityTable } from '@ifc-lite/data';
|
|
26
26
|
export { parseSourceHeader } from './source-header.js';
|
|
27
27
|
export { attachDataStoreAccessors, type IfcStoreData } from './data-store-accessors.js';
|
|
28
|
+
export { buildDropCensus, type DropCensus, type DropCensusInput, type ClassCensusEntry, type DropCategory } from './drop-census.js';
|
|
28
29
|
export { createSyntheticDataStore, type SyntheticDataStoreOptions, type SyntheticEntity } from './synthetic-data-store.js';
|
|
29
30
|
export { parseIfcx, parseFederatedIfcx, addIfcxOverlay, detectFormat, composeIfcx, composeFederated, createLayerStack, createPathIndex, parsePath, type IfcxParseResult, type FederatedIfcxParseResult, type FederatedFileInput, type FederatedParseOptions, type IfcxFile, type IfcxNode, type ComposedNode, type ComposedNodeWithSources, type IfcxLayer, type LayerStack, type PathIndex, type MeshData as IfcxMeshData, type PointCloudExtraction, } from '@ifc-lite/ifcx';
|
|
30
31
|
export { extractMaterials, getMaterialForElement, getMaterialNameForElement, type MaterialsData, type Material, type MaterialLayer, type MaterialLayerSet } from './material-extractor.js';
|
|
31
32
|
export { extractGeoreferencing, transformToWorld, transformToLocal, getCoordinateSystemDescription, computeAngleToGridNorth, type GeoreferenceInfo, type MapConversion, type ProjectedCRS } from './georef-extractor.js';
|
|
32
33
|
export { extractClassifications, getClassificationsForElement, getClassificationCodeForElement, getClassificationPath, groupElementsByClassification, type ClassificationsData, type Classification, type ClassificationReference } from './classification-extractor.js';
|
|
33
34
|
export { extractScheduleOnDemand, parseIso8601Duration, type ScheduleExtraction, type ScheduleTaskInfo, type ScheduleTaskTimeInfo, type ScheduleSequenceInfo, type WorkScheduleInfo, type SequenceTypeEnum, type TaskDurationType, } from './schedule-extractor.js';
|
|
35
|
+
export { extractStructuralOnDemand, type StructuralExtraction, type StructuralAnalysisModelInfo, type StructuralMemberInfo, type StructuralConnectionInfo, type StructuralActivityInfo, type StructuralLoadGroupInfo, type StructuralResultGroupInfo, type StructuralLoadInfo, type StructuralLoadConfigurationInfo, type StructuralLoadConfigurationEntry, type StructuralLoadDropReason, type BoundaryConditionInfo, } from './structural-extractor.js';
|
|
34
36
|
export { serializeScheduleToStep, type SerializeScheduleOptions, type SerializeScheduleResult, } from './schedule-serializer.js';
|
|
37
|
+
export { extractCostOnDemand, } from './cost-extractor.js';
|
|
38
|
+
export type { CostExtraction, CostItemInfo, CostScheduleInfo, CostValueInfo, CostValueUnitBasis, } from './cost-types.js';
|
|
35
39
|
export { secondsToIso8601Duration } from './iso8601-duration.js';
|
|
36
40
|
export { deterministicGlobalId } from './deterministic-global-id.js';
|
|
37
41
|
export { SCHEMA_REGISTRY, getEntityMetadata, getAllAttributesForEntity, getInheritanceChainForEntity, isKnownEntity } from './generated/schema-registry.js';
|
|
42
|
+
export { getSchemaRegistryForVersion, type SchemaVersionWithRegistry, type SchemaRegistry, } from './generated/schema-registry-by-version.js';
|
|
38
43
|
export type * from './generated/entities.js';
|
|
39
44
|
export * from './generated/enums.js';
|
|
40
45
|
export { serializeValue, toStepLine, generateHeader, generateStepFile, parseStepValue, ref, enumVal, isEntityRef, isEnumValue, type StepValue, type StepEntity, type EntityRef as StepEntityRef, type EnumValue, } from './generated/serializers.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxF,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,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CHANGED
|
@@ -28,7 +28,7 @@ export { compressSource, shouldCompressSource, COMPRESSION_MIN_BYTES, } from './
|
|
|
28
28
|
export { DEFAULT_BLOCK_SIZE, DEFAULT_CACHE_BYTES, } from './block-store.js';
|
|
29
29
|
export { CompactEntityIndex, CompactEntityIndexBuilder, buildCompactEntityIndex } from './compact-entity-index.js';
|
|
30
30
|
export { scanIfcEntities } from './entity-scanner.js';
|
|
31
|
-
export { REL_TYPE_MAP,
|
|
31
|
+
export { REL_TYPE_MAP, isIfcTypeLikeEntity } from './columnar-parser-indexes.js';
|
|
32
32
|
export { IFC_SUBTYPES, expandTypes, QUERY_REL_TYPE_MAP } from './query-backend-maps.js';
|
|
33
33
|
export { PropertyExtractor } from './property-extractor.js';
|
|
34
34
|
export { QuantityExtractor } from './quantity-extractor.js';
|
|
@@ -38,9 +38,10 @@ export { extractLengthUnitScale, resolveEntityLengthUnitScale, resolveOwningIfcP
|
|
|
38
38
|
export { extractProjectUnits, measureUnit, ProjectUnits, } from './project-units.js';
|
|
39
39
|
export { quantitySiScale } from './quantity-collect.js';
|
|
40
40
|
export { scaleMeasureValue, scaledPropertyValue, roundToScale } from './measure-unit-scale.js';
|
|
41
|
-
export { ColumnarParser, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractEntityAttributesOnDemand, extractAllEntityAttributes, getRawNamedAttributes, extractRootAttributesFromEntity, extractClassificationsOnDemand, extractClassificationSystemsOnDemand, extractMaterialsOnDemand, extractAllMaterialsOnDemand, extractMaterialPropertiesOnDemand, extractMaterialPropertiesForMaterialId, resolveMaterialDefId, resolveAllMaterialDefIds, collectMaterialLeaves, buildMaterialUsageIndex, getMaterialDisplay, extractTypePropertiesOnDemand, extractTypeEntityOwnProperties, extractTypeQuantitiesOnDemand, mergeInheritedPropertySets, mergeInheritedQuantitySets, extractDocumentsOnDemand, extractRelationshipsOnDemand, extractGroupMembersOnDemand, extractGeoreferencingOnDemand } from './columnar-parser.js';
|
|
41
|
+
export { ColumnarParser, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractEntityAttributesOnDemand, extractAllEntityAttributes, getRawNamedAttributes, extractRootAttributesFromEntity, extractClassificationsOnDemand, extractClassificationSystemsOnDemand, extractMaterialsOnDemand, extractAllMaterialsOnDemand, extractMaterialPropertiesOnDemand, extractMaterialPropertiesForMaterialId, resolveMaterialDefId, resolveAllMaterialDefIds, collectMaterialLeaves, buildMaterialUsageIndex, getMaterialDisplay, extractTypePropertiesOnDemand, extractTypeEntityOwnProperties, extractTypeQuantitiesOnDemand, mergeInheritedPropertySets, mergeInheritedQuantitySets, extractDocumentsOnDemand, extractRelationshipsOnDemand, extractGroupMembersOnDemand, extractGroupAssignmentFactorOnDemand, extractGeoreferencingOnDemand } from './columnar-parser.js';
|
|
42
42
|
export { parseSourceHeader } from './source-header.js';
|
|
43
43
|
export { attachDataStoreAccessors } from './data-store-accessors.js';
|
|
44
|
+
export { buildDropCensus } from './drop-census.js';
|
|
44
45
|
export { createSyntheticDataStore } from './synthetic-data-store.js';
|
|
45
46
|
// WorkerParser is browser-only due to Vite worker imports
|
|
46
47
|
// Import from '@ifc-lite/parser/browser' instead
|
|
@@ -53,9 +54,18 @@ export { extractClassifications, getClassificationsForElement, getClassification
|
|
|
53
54
|
// 4D / scheduling extractor — IfcTask, IfcTaskTime, IfcRelSequence, IfcRelAssignsToProcess,
|
|
54
55
|
// IfcRelAssignsToControl, IfcRelNests, IfcWorkSchedule, IfcWorkPlan, IfcLagTime.
|
|
55
56
|
export { extractScheduleOnDemand, parseIso8601Duration, } from './schedule-extractor.js';
|
|
57
|
+
// Structural analysis extractor — IfcStructuralAnalysisModel, the
|
|
58
|
+
// IfcStructuralMember / IfcStructuralConnection / IfcStructuralActivity
|
|
59
|
+
// branches, IfcStructuralLoadGroup / IfcStructuralLoadCase,
|
|
60
|
+
// IfcStructuralResultGroup, IfcBoundaryCondition, and the two structural
|
|
61
|
+
// connects-relationships.
|
|
62
|
+
export { extractStructuralOnDemand, } from './structural-extractor.js';
|
|
56
63
|
// IFC4 STEP serializer for schedule entities — produces ready-to-splice
|
|
57
64
|
// `#N=IFC...(...)` lines from a `ScheduleExtraction`.
|
|
58
65
|
export { serializeScheduleToStep, } from './schedule-serializer.js';
|
|
66
|
+
// Cost (5D) extractor — IfcCostItem, IfcCostValue, IfcCostSchedule, IfcRelNests,
|
|
67
|
+
// IfcRelAssignsToControl. Read model + extraction only (#4322).
|
|
68
|
+
export { extractCostOnDemand, } from './cost-extractor.js';
|
|
59
69
|
// Signed ISO 8601 duration codec — shared by the schedule extractor (decode)
|
|
60
70
|
// and serializer (encode), and by any other schedule consumer that needs to
|
|
61
71
|
// go from seconds to an `IfcDuration` string or back. See the module doc
|
|
@@ -68,6 +78,7 @@ export { secondsToIso8601Duration } from './iso8601-duration.js';
|
|
|
68
78
|
export { deterministicGlobalId } from './deterministic-global-id.js';
|
|
69
79
|
// Generated IFC4 schema (100% coverage - 776 entities, 397 types, 207 enums)
|
|
70
80
|
export { SCHEMA_REGISTRY, getEntityMetadata, getAllAttributesForEntity, getInheritanceChainForEntity, isKnownEntity } from './generated/schema-registry.js';
|
|
81
|
+
export { getSchemaRegistryForVersion, } from './generated/schema-registry-by-version.js';
|
|
71
82
|
export * from './generated/enums.js';
|
|
72
83
|
// STEP serialization support for IFC export
|
|
73
84
|
export { serializeValue, toStepLine, generateHeader, generateStepFile, parseStepValue, ref, enumVal, isEntityRef, isEnumValue, } from './generated/serializers.js';
|