@pascal-app/ifc-converter 1.0.0-beta.5 → 1.0.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.
@@ -0,0 +1,6 @@
1
+ export type StoreyElevation = {
2
+ expressId: number;
3
+ elevation: number;
4
+ };
5
+ export declare function selectStoreyForElevation(candidates: StoreyElevation[], elementElevation: number): number | null;
6
+ //# sourceMappingURL=storey-semantics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storey-semantics.d.ts","sourceRoot":"","sources":["../src/storey-semantics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,eAAe,EAAE,EAC7B,gBAAgB,EAAE,MAAM,GACvB,MAAM,GAAG,IAAI,CAIf"}
@@ -0,0 +1,5 @@
1
+ export function selectStoreyForElevation(candidates, elementElevation) {
2
+ const ordered = [...candidates].sort((a, b) => a.elevation - b.elevation);
3
+ const atOrBelow = ordered.filter((candidate) => candidate.elevation <= elementElevation + 0.1);
4
+ return atOrBelow.at(-1)?.expressId ?? ordered.at(0)?.expressId ?? null;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pascal-app/ifc-converter",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.1",
4
4
  "description": "IFC → Pascal scene-graph conversion. Pure logic — no DOM, no React.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "prepublishOnly": "npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@pascal-app/core": "*",
26
+ "@pascal-app/core": "^1.0.1",
27
27
  "nanoid": "^5.1.6",
28
28
  "web-ifc": "^0.0.77"
29
29
  },