@idfkit/core 0.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.
Files changed (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +120 -0
  3. package/dist/collection.d.ts +48 -0
  4. package/dist/collection.d.ts.map +1 -0
  5. package/dist/collection.js +100 -0
  6. package/dist/collection.js.map +1 -0
  7. package/dist/document.d.ts +100 -0
  8. package/dist/document.d.ts.map +1 -0
  9. package/dist/document.js +0 -0
  10. package/dist/document.js.map +1 -0
  11. package/dist/index.d.ts +30 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +21 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/internal.d.ts +25 -0
  16. package/dist/internal.d.ts.map +1 -0
  17. package/dist/internal.js +25 -0
  18. package/dist/internal.js.map +1 -0
  19. package/dist/node.d.ts +40 -0
  20. package/dist/node.d.ts.map +1 -0
  21. package/dist/node.js +70 -0
  22. package/dist/node.js.map +1 -0
  23. package/dist/object.d.ts +114 -0
  24. package/dist/object.d.ts.map +1 -0
  25. package/dist/object.js +224 -0
  26. package/dist/object.js.map +1 -0
  27. package/dist/parse/epjson.d.ts +16 -0
  28. package/dist/parse/epjson.d.ts.map +1 -0
  29. package/dist/parse/epjson.js +91 -0
  30. package/dist/parse/epjson.js.map +1 -0
  31. package/dist/parse/idf.d.ts +44 -0
  32. package/dist/parse/idf.d.ts.map +1 -0
  33. package/dist/parse/idf.js +170 -0
  34. package/dist/parse/idf.js.map +1 -0
  35. package/dist/parse/lexer.d.ts +37 -0
  36. package/dist/parse/lexer.d.ts.map +1 -0
  37. package/dist/parse/lexer.js +105 -0
  38. package/dist/parse/lexer.js.map +1 -0
  39. package/dist/references.d.ts +56 -0
  40. package/dist/references.d.ts.map +1 -0
  41. package/dist/references.js +147 -0
  42. package/dist/references.js.map +1 -0
  43. package/dist/shape.d.ts +54 -0
  44. package/dist/shape.d.ts.map +1 -0
  45. package/dist/shape.js +114 -0
  46. package/dist/shape.js.map +1 -0
  47. package/dist/typemap.d.ts +43 -0
  48. package/dist/typemap.d.ts.map +1 -0
  49. package/dist/typemap.js +18 -0
  50. package/dist/typemap.js.map +1 -0
  51. package/dist/types/v26-1.d.ts +65896 -0
  52. package/dist/types/v26-1.d.ts.map +1 -0
  53. package/dist/types/v26-1.js +5 -0
  54. package/dist/types/v26-1.js.map +1 -0
  55. package/dist/types/v9-4.d.ts +61414 -0
  56. package/dist/types/v9-4.d.ts.map +1 -0
  57. package/dist/types/v9-4.js +5 -0
  58. package/dist/types/v9-4.js.map +1 -0
  59. package/dist/versions.d.ts +17 -0
  60. package/dist/versions.d.ts.map +1 -0
  61. package/dist/versions.js +34 -0
  62. package/dist/versions.js.map +1 -0
  63. package/dist/write/epjson.d.ts +15 -0
  64. package/dist/write/epjson.d.ts.map +1 -0
  65. package/dist/write/epjson.js +10 -0
  66. package/dist/write/epjson.js.map +1 -0
  67. package/dist/write/idf.d.ts +47 -0
  68. package/dist/write/idf.d.ts.map +1 -0
  69. package/dist/write/idf.js +149 -0
  70. package/dist/write/idf.js.map +1 -0
  71. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Samuel Letellier-Duchesne
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # @idfkit/core
2
+
3
+ EnergyPlus IDF and epJSON parsing and manipulation for JavaScript.
4
+
5
+ Zero runtime dependencies apart from [`@idfkit/schemas`](../schemas). The main
6
+ entry point is synchronous and free of I/O, so it runs unchanged in Node, a
7
+ browser, a worker, or an edge runtime.
8
+
9
+ **[Documentation](https://js.idfkit.com/)** ·
10
+ [API reference](https://js.idfkit.com/reference/core/) ·
11
+ [Tutorial](https://js.idfkit.com/tutorials/first-model/)
12
+
13
+ ```bash
14
+ npm install @idfkit/core @idfkit/schemas
15
+ ```
16
+
17
+ ## Entry points
18
+
19
+ | Import | Contents | Environment |
20
+ | -------------------------- | -------------------------------------------------------- | ----------- |
21
+ | `@idfkit/core` | Parsing, writing, the object model. Synchronous, no I/O. | Anywhere |
22
+ | `@idfkit/core/node` | `loadIdf`, `saveIdf`, schema discovery from disk | Node |
23
+ | `@idfkit/core/types/v26-1` | Generated interfaces and `TypeMap` for one version | Types only |
24
+
25
+ ## Usage
26
+
27
+ ```ts
28
+ import { loadIdf, saveIdf } from '@idfkit/core/node';
29
+ import type { TypeMap } from '@idfkit/core/types/v26-1';
30
+
31
+ const doc = await loadIdf<TypeMap>('model.idf');
32
+
33
+ // Collections are iterable and indexed by name (case-insensitive, O(1)).
34
+ const zones = doc.all('Zone');
35
+ zones.size;
36
+ zones.get('SPACE1-1')?.ceiling_height;
37
+ zones.map((z) => z.name);
38
+
39
+ // Surfaces on a zone, via the reference graph rather than a scan.
40
+ doc.references.referencingObjects('SPACE1-1');
41
+
42
+ // Creating objects.
43
+ const zone = doc.add('Zone', 'Open Office', { ceiling_height: 2.7, multiplier: 1 });
44
+
45
+ // Extensible groups are a live array.
46
+ const surface = doc.add('BuildingSurface:Detailed', 'Wall-1', {
47
+ surface_type: 'Wall',
48
+ zone_name: 'Open Office',
49
+ });
50
+ surface.extensible.push({
51
+ vertex_x_coordinate: 0,
52
+ vertex_y_coordinate: 0,
53
+ vertex_z_coordinate: 3,
54
+ });
55
+
56
+ // Renaming rewrites every field elsewhere that pointed at the old name.
57
+ zone.name = 'Open Plan';
58
+ surface.zone_name; // 'Open Plan'
59
+
60
+ await saveIdf(doc, 'out.idf');
61
+ ```
62
+
63
+ ### Without a filesystem
64
+
65
+ ```ts
66
+ import { parseIdf, writeIdf, SchemaBundle, httpSource } from '@idfkit/core';
67
+
68
+ const bundle = new SchemaBundle(httpSource('/schemas/'));
69
+ const schema = await bundle.load('26.1.0');
70
+
71
+ const { document, diagnostics } = parseIdf(text, schema, { strict: false });
72
+ const output = writeIdf(document);
73
+ ```
74
+
75
+ See [How to parse in the browser](https://js.idfkit.com/how-to/parse-in-the-browser/).
76
+
77
+ ### Diagnostics
78
+
79
+ `strict: true` (the default) throws an `IdfParseError` on the first problem.
80
+ `strict: false` collects diagnostics and keeps going, which is what an editor or
81
+ a batch job wants:
82
+
83
+ ```ts
84
+ const { document, diagnostics } = parseIdf(text, schema, { strict: false });
85
+ for (const d of diagnostics) {
86
+ console.warn(`${d.line}: ${d.message}`);
87
+ }
88
+ ```
89
+
90
+ See [How to collect diagnostics instead of
91
+ throwing](https://js.idfkit.com/how-to/collect-diagnostics/).
92
+
93
+ ## API
94
+
95
+ The full API is generated from the source and published at
96
+ **[js.idfkit.com/reference/core](https://js.idfkit.com/reference/core/)**.
97
+
98
+ The main entry points:
99
+
100
+ - **`IDFDocument<M>`** — collections by type, a live reference graph, bound to
101
+ one EnergyPlus version. `M` is an optional generated type map; omit it and
102
+ everything still works, just untyped.
103
+ - **`IdfObject`** — one EnergyPlus object. Fields are real properties;
104
+ `obj.get(field)` and `obj.set(field, value)` are the untyped equivalents for
105
+ version-generic code.
106
+ - **`IdfCollection`** — name-indexed, insertion-ordered, case-insensitive.
107
+ - **`parseIdf` / `writeIdf`** and **`parseEpJson` / `writeEpJson`** — synchronous,
108
+ string in and string out.
109
+
110
+ ## Notes
111
+
112
+ Field names are epJSON names (`zone_name`), not the space-separated IDD labels.
113
+
114
+ Numeric fields holding `Autosize` or `Autocalculate` stay as strings; the
115
+ generated types reflect that with `number | 'Autosize' | 'Autocalculate'`.
116
+
117
+ Writing does not preserve source formatting. `3.0` comes back as `3`, since
118
+ JavaScript has one number type and the distinction is gone once parsed. The
119
+ models are semantically identical and EnergyPlus reads both, but a textual diff
120
+ will show those fields.
@@ -0,0 +1,48 @@
1
+ import type { IdfObject } from './object.js';
2
+ /**
3
+ * Name-indexed collection of objects of one type.
4
+ *
5
+ * Iterable, so `for (const zone of doc.all('Zone'))` works, and array-like
6
+ * enough that `[...collection]`, `.map`, `.filter` read naturally. Lookup by
7
+ * name is O(1) and case-insensitive, matching EnergyPlus semantics.
8
+ *
9
+ * Insertion order is preserved. IDF files are hand-edited and diffed, so
10
+ * reordering objects on a round-trip would produce noisy diffs for no reason.
11
+ */
12
+ export declare class IdfCollection<T extends IdfObject = IdfObject> implements Iterable<T> {
13
+ #private;
14
+ readonly typeName: string;
15
+ constructor(typeName: string, objects?: Iterable<T>);
16
+ get size(): number;
17
+ [Symbol.iterator](): Iterator<T>;
18
+ /** Look up by name, case-insensitively. */
19
+ get(name: string): T | undefined;
20
+ /** Look up by name, throwing if absent. */
21
+ require(name: string): T;
22
+ has(name: string): boolean;
23
+ /** The only object of this type, for singletons like `Building`. */
24
+ get only(): T | undefined;
25
+ /** The first object, in insertion order. */
26
+ get first(): T | undefined;
27
+ names(): string[];
28
+ toArray(): T[];
29
+ filter(predicate: (obj: T, index: number) => boolean): T[];
30
+ map<R>(fn: (obj: T, index: number) => R): R[];
31
+ find(predicate: (obj: T, index: number) => boolean): T | undefined;
32
+ /** Objects whose `field` equals `value`, compared case-insensitively. */
33
+ where(field: string, value: string): T[];
34
+ /** @internal */
35
+ insert(obj: T): void;
36
+ /** @internal */
37
+ delete(name: string): boolean;
38
+ /**
39
+ * Re-key an object after a rename, preserving insertion order.
40
+ *
41
+ * A plain delete-then-insert would move the object to the end of the
42
+ * collection, which shows up as a spurious reordering when the document is
43
+ * written back out.
44
+ * @internal
45
+ */
46
+ rekey(previous: string, next: string): void;
47
+ }
48
+ //# sourceMappingURL=collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;GASG;AACH,qBAAa,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;;IAChF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAKd,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,QAAQ,CAAC,CAAC,CAAM;IAKvD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;IAIhC,2CAA2C;IAC3C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAIhC,2CAA2C;IAC3C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC;IAQxB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,oEAAoE;IACpE,IAAI,IAAI,IAAI,CAAC,GAAG,SAAS,CAGxB;IAED,4CAA4C;IAC5C,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAEzB;IAED,KAAK,IAAI,MAAM,EAAE;IAIjB,OAAO,IAAI,CAAC,EAAE;IAId,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE;IAI1D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;IAI7C,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,GAAG,SAAS;IAIlE,yEAAyE;IACzE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE;IAUxC,gBAAgB;IAChB,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI;IAIpB,gBAAgB;IAChB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI7B;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;CAQ5C"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Name-indexed collection of objects of one type.
3
+ *
4
+ * Iterable, so `for (const zone of doc.all('Zone'))` works, and array-like
5
+ * enough that `[...collection]`, `.map`, `.filter` read naturally. Lookup by
6
+ * name is O(1) and case-insensitive, matching EnergyPlus semantics.
7
+ *
8
+ * Insertion order is preserved. IDF files are hand-edited and diffed, so
9
+ * reordering objects on a round-trip would produce noisy diffs for no reason.
10
+ */
11
+ export class IdfCollection {
12
+ typeName;
13
+ /** lowercased collection key -> object. */
14
+ #byName = new Map();
15
+ constructor(typeName, objects = []) {
16
+ this.typeName = typeName;
17
+ for (const obj of objects)
18
+ this.#byName.set(obj.key.toLowerCase(), obj);
19
+ }
20
+ get size() {
21
+ return this.#byName.size;
22
+ }
23
+ [Symbol.iterator]() {
24
+ return this.#byName.values();
25
+ }
26
+ /** Look up by name, case-insensitively. */
27
+ get(name) {
28
+ return this.#byName.get(name.toLowerCase());
29
+ }
30
+ /** Look up by name, throwing if absent. */
31
+ require(name) {
32
+ const obj = this.get(name);
33
+ if (obj === undefined) {
34
+ throw new Error(`No ${this.typeName} named "${name}"`);
35
+ }
36
+ return obj;
37
+ }
38
+ has(name) {
39
+ return this.#byName.has(name.toLowerCase());
40
+ }
41
+ /** The only object of this type, for singletons like `Building`. */
42
+ get only() {
43
+ if (this.#byName.size !== 1)
44
+ return undefined;
45
+ return this.#byName.values().next().value;
46
+ }
47
+ /** The first object, in insertion order. */
48
+ get first() {
49
+ return this.#byName.values().next().value;
50
+ }
51
+ names() {
52
+ return [...this.#byName.values()].map((obj) => obj.name);
53
+ }
54
+ toArray() {
55
+ return [...this.#byName.values()];
56
+ }
57
+ filter(predicate) {
58
+ return this.toArray().filter(predicate);
59
+ }
60
+ map(fn) {
61
+ return this.toArray().map(fn);
62
+ }
63
+ find(predicate) {
64
+ return this.toArray().find(predicate);
65
+ }
66
+ /** Objects whose `field` equals `value`, compared case-insensitively. */
67
+ where(field, value) {
68
+ const needle = value.toLowerCase();
69
+ return this.filter((obj) => {
70
+ const actual = obj.get(field);
71
+ return typeof actual === 'string' && actual.toLowerCase() === needle;
72
+ });
73
+ }
74
+ // --- mutation, used by IDFDocument -------------------------------------
75
+ /** @internal */
76
+ insert(obj) {
77
+ this.#byName.set(obj.key.toLowerCase(), obj);
78
+ }
79
+ /** @internal */
80
+ delete(name) {
81
+ return this.#byName.delete(name.toLowerCase());
82
+ }
83
+ /**
84
+ * Re-key an object after a rename, preserving insertion order.
85
+ *
86
+ * A plain delete-then-insert would move the object to the end of the
87
+ * collection, which shows up as a spurious reordering when the document is
88
+ * written back out.
89
+ * @internal
90
+ */
91
+ rekey(previous, next) {
92
+ const entries = [...this.#byName.entries()];
93
+ this.#byName.clear();
94
+ const previousKey = previous.toLowerCase();
95
+ for (const [key, obj] of entries) {
96
+ this.#byName.set(key === previousKey ? next.toLowerCase() : key, obj);
97
+ }
98
+ }
99
+ }
100
+ //# sourceMappingURL=collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.js","s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GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,gBAAgB;IAChB,MAAM,CAAC,IAAY;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,QAAgB,EAAE,IAAY;QAClC,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC;YACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,100 @@
1
+ import type { Schema } from '@idfkit/schemas';
2
+ import { IdfCollection } from './collection.js';
3
+ import { IdfObject, type FieldValues, type ObjectOwner, type StoredValue } from './object.js';
4
+ import { ReferenceGraph } from './references.js';
5
+ import type { AnyTypeMap, ObjectOf, TypeNameOf, UntypedMap, ValuesOf } from './typemap.js';
6
+ /**
7
+ * An EnergyPlus model.
8
+ *
9
+ * Holds collections keyed by object type, a live reference graph, and the
10
+ * schema for one specific EnergyPlus version. Every document is bound to a
11
+ * version at construction; there is no version-agnostic mode, because field
12
+ * order and reference lists genuinely differ between releases.
13
+ *
14
+ * The optional `M` parameter attaches a generated type map, which makes field
15
+ * access statically checked without changing anything at runtime. See
16
+ * `typemap.ts`.
17
+ */
18
+ export declare class IDFDocument<M extends AnyTypeMap = UntypedMap> implements ObjectOwner {
19
+ #private;
20
+ readonly schema: Schema;
21
+ constructor(schema: Schema);
22
+ /** EnergyPlus version this model targets, e.g. `"26.1.0"`. */
23
+ get version(): string;
24
+ get references(): ReferenceGraph;
25
+ /** Object type names present in this document, in insertion order. */
26
+ types(): string[];
27
+ /** Total object count across all types. */
28
+ get size(): number;
29
+ /**
30
+ * Every object of one type.
31
+ *
32
+ * When the document carries a generated type map, the argument completes
33
+ * among that version's type names and the result is narrowed to the matching
34
+ * field interface. Unknown names still work and simply stay untyped, which is
35
+ * what version-generic code needs.
36
+ */
37
+ all<K extends TypeNameOf<M>>(type: K): IdfCollection<IdfObject & ObjectOf<M, K>>;
38
+ /**
39
+ * Untyped collection access.
40
+ *
41
+ * The public `all()` is generic over the type map, which means the compiler
42
+ * cannot verify calls made from inside this class or from the parsers, where
43
+ * the type name is a runtime string. Those go through here instead, so the
44
+ * single unavoidable cast lives in one place rather than at every call site.
45
+ */
46
+ collection(type: string): IdfCollection;
47
+ /** One object by type and name. */
48
+ get<K extends TypeNameOf<M>>(type: K, name: string): (IdfObject & ObjectOf<M, K>) | undefined;
49
+ /** One object by type and name, throwing if absent. */
50
+ require<K extends TypeNameOf<M>>(type: K, name: string): IdfObject & ObjectOf<M, K>;
51
+ /** Whether any object of this type exists. */
52
+ has(type: string): boolean;
53
+ /**
54
+ * Create an object and attach it to the document.
55
+ *
56
+ * Anonymous types (`Version`, `Timestep`) take `null` for the name and get a
57
+ * synthetic key that never appears in output.
58
+ */
59
+ add<K extends TypeNameOf<M>>(type: K, name: string | null, values?: ValuesOf<M, K>): IdfObject & ObjectOf<M, K>;
60
+ /**
61
+ * Untyped object creation, for the parsers.
62
+ *
63
+ * They work from runtime strings, so the compiler cannot check them against
64
+ * the type map. Same reasoning as `collection()`: one deliberate seam rather
65
+ * than casts scattered through the parse loop.
66
+ */
67
+ addRaw(type: string, name: string | null, values?: FieldValues): IdfObject;
68
+ /**
69
+ * Attach an existing detached object, e.g. one produced by `clone()`.
70
+ *
71
+ * Repeats the checks `addRaw` makes rather than trusting the object. An
72
+ * object carries its own schema definition, so one cloned out of a document
73
+ * on a different EnergyPlus version would otherwise be written using that
74
+ * version's field order under this document's `Version` header, which
75
+ * mis-maps every field on reload instead of failing.
76
+ */
77
+ attach(obj: IdfObject): IdfObject;
78
+ /** Remove an object. Does not touch objects that referenced it. */
79
+ remove(obj: IdfObject): boolean;
80
+ /**
81
+ * Rename an object and rewrite every reference to it.
82
+ *
83
+ * Equivalent to assigning `obj.name`.
84
+ */
85
+ rename(obj: IdfObject, next: string): void;
86
+ /** Every object in the document, grouped by type in insertion order. */
87
+ objects(): Generator<IdfObject>;
88
+ /** Reference targets that no object provides. */
89
+ danglingReferences(): ReturnType<ReferenceGraph['dangling']>;
90
+ /**
91
+ * epJSON representation.
92
+ *
93
+ * Anonymous objects get the `"<type> 1"` key EnergyPlus itself emits, which
94
+ * is what makes the output loadable by the real engine.
95
+ */
96
+ toJSON(): Record<string, Record<string, Record<string, StoredValue>>>;
97
+ onFieldChanged(obj: IdfObject, field: string, previous: unknown, next: unknown): void;
98
+ onNameChanged(obj: IdfObject, previous: string, next: string): void;
99
+ }
100
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAY,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE3F;;;;;;;;;;;GAWG;AACH,qBAAa,WAAW,CA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AM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IAC7B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IAC7B,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1C,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * `@idfkit/core` — EnergyPlus IDF and epJSON parsing and manipulation.
3
+ *
4
+ * Everything exported here is synchronous and free of I/O, so it runs
5
+ * unchanged in Node, a browser, a worker, or an edge runtime. Reading files and
6
+ * loading schema bundles lives in `@idfkit/core/node`, or is done by the caller
7
+ * via `@idfkit/schemas`.
8
+ */
9
+ export { IdfCollection } from './collection.js';
10
+ export { IDFDocument } from './document.js';
11
+ export { IdfObject } from './object.js';
12
+ export type { ExtensibleGroup, FieldValue, FieldValues, ObjectOwner, StoredValue, } from './object.js';
13
+ export { ReferenceGraph } from './references.js';
14
+ export type { ReferenceEdge } from './references.js';
15
+ export { ObjectShape, shapeFor, shapeOf } from './shape.js';
16
+ export type { AnyTypeMap, ObjectOf, TypeNameOf, UntypedMap, ValuesOf } from './typemap.js';
17
+ export { compareVersions, resolveVersion, versionKey } from './versions.js';
18
+ export { lex } from './parse/lexer.js';
19
+ export type { LexDiagnostic, LexOptions, RawObject } from './parse/lexer.js';
20
+ export { detectVersion, IdfParseError, parseIdf } from './parse/idf.js';
21
+ export type { ParseDiagnostic, ParseOptions, ParseResult } from './parse/idf.js';
22
+ export { detectEpJsonVersion, parseEpJson } from './parse/epjson.js';
23
+ export type { EpJson } from './parse/epjson.js';
24
+ export { writeIdf, writeObject } from './write/idf.js';
25
+ export type { ObjectWriteOptions, WriteIdfOptions } from './write/idf.js';
26
+ export { toEpJson, writeEpJson } from './write/epjson.js';
27
+ export type { WriteEpJsonOptions } from './write/epjson.js';
28
+ export { Schema, SchemaBundle, httpSource } from '@idfkit/schemas';
29
+ export type { BundleSource, SchemaDelta, SlimField, SlimType } from '@idfkit/schemas';
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `@idfkit/core` — EnergyPlus IDF and epJSON parsing and manipulation.
3
+ *
4
+ * Everything exported here is synchronous and free of I/O, so it runs
5
+ * unchanged in Node, a browser, a worker, or an edge runtime. Reading files and
6
+ * loading schema bundles lives in `@idfkit/core/node`, or is done by the caller
7
+ * via `@idfkit/schemas`.
8
+ */
9
+ export { IdfCollection } from './collection.js';
10
+ export { IDFDocument } from './document.js';
11
+ export { IdfObject } from './object.js';
12
+ export { ReferenceGraph } from './references.js';
13
+ export { ObjectShape, shapeFor, shapeOf } from './shape.js';
14
+ export { compareVersions, resolveVersion, versionKey } from './versions.js';
15
+ export { lex } from './parse/lexer.js';
16
+ export { detectVersion, IdfParseError, parseIdf } from './parse/idf.js';
17
+ export { detectEpJsonVersion, parseEpJson } from './parse/epjson.js';
18
+ export { writeIdf, writeObject } from './write/idf.js';
19
+ export { toEpJson, writeEpJson } from './write/epjson.js';
20
+ export { Schema, SchemaBundle, httpSource } from '@idfkit/schemas';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Symbol-keyed internals.
3
+ *
4
+ * Field accessors are generated from schema field names, which are arbitrary
5
+ * strings. Symbols guarantee an object type can never define a field that
6
+ * collides with our own bookkeeping.
7
+ */
8
+ /** Backing store of field values, keyed by epJSON field name. */
9
+ export declare const DATA: unique symbol;
10
+ /** The object's shape (type name, schema definition, prototype). */
11
+ export declare const SHAPE: unique symbol;
12
+ /** Owning document, or undefined for a detached object. */
13
+ export declare const OWNER: unique symbol;
14
+ /** The object's name as written in the file. May be empty. */
15
+ export declare const NAME: unique symbol;
16
+ /**
17
+ * The object's key within its collection.
18
+ *
19
+ * Usually identical to the name. It differs for objects that have no name
20
+ * (`Version`) and for those whose name is legitimately blank (EnergyPlus lets
21
+ * `WeatherProperty:SkyTemperature` omit its name to mean "all run periods"),
22
+ * which still need a unique slot in the collection.
23
+ */
24
+ export declare const KEY: unique symbol;
25
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iEAAiE;AACjE,eAAO,MAAM,IAAI,eAAwB,CAAC;AAE1C,oEAAoE;AACpE,eAAO,MAAM,KAAK,eAAyB,CAAC;AAE5C,2DAA2D;AAC3D,eAAO,MAAM,KAAK,eAAyB,CAAC;AAE5C,8DAA8D;AAC9D,eAAO,MAAM,IAAI,eAAwB,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,eAAuB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Symbol-keyed internals.
3
+ *
4
+ * Field accessors are generated from schema field names, which are arbitrary
5
+ * strings. Symbols guarantee an object type can never define a field that
6
+ * collides with our own bookkeeping.
7
+ */
8
+ /** Backing store of field values, keyed by epJSON field name. */
9
+ export const DATA = Symbol('idfkit.data');
10
+ /** The object's shape (type name, schema definition, prototype). */
11
+ export const SHAPE = Symbol('idfkit.shape');
12
+ /** Owning document, or undefined for a detached object. */
13
+ export const OWNER = Symbol('idfkit.owner');
14
+ /** The object's name as written in the file. May be empty. */
15
+ export const NAME = Symbol('idfkit.name');
16
+ /**
17
+ * The object's key within its collection.
18
+ *
19
+ * Usually identical to the name. It differs for objects that have no name
20
+ * (`Version`) and for those whose name is legitimately blank (EnergyPlus lets
21
+ * `WeatherProperty:SkyTemperature` omit its name to mean "all run periods"),
22
+ * which still need a unique slot in the collection.
23
+ */
24
+ export const KEY = Symbol('idfkit.key');
25
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAE1C,oEAAoE;AACpE,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE5C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE5C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC"}
package/dist/node.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Node-only conveniences.
3
+ *
4
+ * This is the async edge of the library. The core is sync and pure; everything
5
+ * that touches a disk or a network is here, so the portable surface never has
6
+ * to be async "just in case" and browser bundles never pull in `node:fs`.
7
+ */
8
+ import { SchemaBundle, type Schema } from '@idfkit/schemas';
9
+ import type { IDFDocument } from './document.js';
10
+ import { type ParseOptions, type ParseResult } from './parse/idf.js';
11
+ import type { AnyTypeMap, UntypedMap } from './typemap.js';
12
+ import { type WriteEpJsonOptions } from './write/epjson.js';
13
+ import { type WriteIdfOptions } from './write/idf.js';
14
+ /** The schema bundle shipped with `@idfkit/schemas`, created once per process. */
15
+ export declare function schemas(): SchemaBundle;
16
+ export interface LoadOptions extends ParseOptions {
17
+ /** Force a schema version instead of reading it from the file. */
18
+ version?: string;
19
+ /** Use a specific bundle rather than the default. */
20
+ bundle?: SchemaBundle;
21
+ }
22
+ /**
23
+ * Resolve the schema for a file whose version was detected from its contents.
24
+ *
25
+ * Exported because callers who parse text themselves still need this step, and
26
+ * getting it wrong (loading 26.1 for a 9.0 file) silently mis-maps every
27
+ * positional field rather than failing loudly.
28
+ */
29
+ export declare function schemaFor(detected: string | undefined, options?: LoadOptions): Promise<Schema>;
30
+ /** Read and parse an IDF file. */
31
+ export declare function loadIdf<M extends AnyTypeMap = UntypedMap>(path: string, options?: LoadOptions): Promise<IDFDocument<M>>;
32
+ /** Read and parse an IDF file, keeping non-fatal diagnostics. */
33
+ export declare function loadIdfWithDiagnostics<M extends AnyTypeMap = UntypedMap>(path: string, options?: LoadOptions): Promise<ParseResult<M>>;
34
+ /** Read and parse an epJSON file. */
35
+ export declare function loadEpJson<M extends AnyTypeMap = UntypedMap>(path: string, options?: LoadOptions): Promise<IDFDocument<M>>;
36
+ /** Write a document to an IDF file. */
37
+ export declare function saveIdf<M extends AnyTypeMap>(document: IDFDocument<M>, path: string, options?: WriteIdfOptions): Promise<void>;
38
+ /** Write a document to an epJSON file. */
39
+ export declare function saveEpJson<M extends AnyTypeMap>(document: IDFDocument<M>, path: string, options?: WriteEpJsonOptions): Promise<void>;
40
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAA2B,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIhE,kFAAkF;AAClF,wBAAgB,OAAO,IAAI,YAAY,CAGtC;AAED,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B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