@ifc-lite/encoding 1.14.8 → 1.14.10

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 (2) hide show
  1. package/README.md +46 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @ifc-lite/encoding
2
+
3
+ IFC string encoding and decoding, GlobalId (GUID) utilities, and property value parsing. Small, dependency-free helpers for the text-level details of IFC STEP files: the `\X2\...\X0\` escape sequences used for non-ASCII characters, the 22-character base64-like IFC GUID format, and typed STEP property values like `IFCBOOLEAN(.T.)`.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @ifc-lite/encoding
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import {
15
+ decodeIfcString,
16
+ encodeIfcString,
17
+ generateIfcGuid,
18
+ ifcGuidToUuid,
19
+ parsePropertyValue,
20
+ } from '@ifc-lite/encoding';
21
+
22
+ decodeIfcString('Gew\\X2\\00E4\\X0\\chshaus'); // 'Gewächshaus' (real umlaut)
23
+ encodeIfcString('Tür'); // 'T\\X\\FCr'
24
+
25
+ const guid = generateIfcGuid(); // 22-char IFC GlobalId
26
+ const uuid = ifcGuidToUuid(guid); // standard UUID form
27
+
28
+ parsePropertyValue(['IFCBOOLEAN', '.T.']); // { displayValue: 'True', ifcType: ... }
29
+ ```
30
+
31
+ ## Exports
32
+
33
+ - `decodeIfcString` / `encodeIfcString`: STEP `\X2\`, `\X\`, `\S\` escape handling
34
+ - `generateIfcGuid`, `generateUuid`: new identifiers
35
+ - `uuidToIfcGuid`, `ifcGuidToUuid`: convert between UUIDs and 22-char IFC GUIDs
36
+ - `isValidIfcGuid`, `isValidUuid`: validation
37
+ - `parsePropertyValue`: turn raw STEP property values (typed arrays, `.T.`/`.F.`, enums) into a display string plus optional IFC type name
38
+
39
+ ## Links
40
+
41
+ - Docs: https://ifclite.dev/docs/
42
+ - Source: https://github.com/LTplus-AG/ifc-lite
43
+
44
+ ## License
45
+
46
+ MPL-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifc-lite/encoding",
3
- "version": "1.14.8",
3
+ "version": "1.14.10",
4
4
  "description": "IFC string encoding/decoding and property value parsing for IFC-Lite",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "url": "https://github.com/LTplus-AG/ifc-lite.git",
24
24
  "directory": "packages/encoding"
25
25
  },
26
- "homepage": "https://ltplus-ag.github.io/ifc-lite/",
26
+ "homepage": "https://ifclite.dev/docs/",
27
27
  "bugs": "https://github.com/LTplus-AG/ifc-lite/issues",
28
28
  "keywords": [
29
29
  "ifc",