@idfkit/schemas 0.1.0 → 0.2.0-rc.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/README.md +7 -5
- package/data/manifest-22-1-0.json.gz +0 -0
- package/data/manifest-22-2-0.json.gz +0 -0
- package/data/manifest-23-1-0.json.gz +0 -0
- package/data/manifest-23-2-0.json.gz +0 -0
- package/data/manifest-24-1-0.json.gz +0 -0
- package/data/manifest-24-2-0.json.gz +0 -0
- package/data/manifest-25-1-0.json.gz +0 -0
- package/data/manifest-25-2-0.json.gz +0 -0
- package/data/manifest-26-1-0.json.gz +0 -0
- package/data/manifest-8-9-0.json.gz +0 -0
- package/data/manifest-9-0-1.json.gz +0 -0
- package/data/manifest-9-1-0.json.gz +0 -0
- package/data/manifest-9-2-0.json.gz +0 -0
- package/data/manifest-9-3-0.json.gz +0 -0
- package/data/manifest-9-4-0.json.gz +0 -0
- package/data/manifest-9-5-0.json.gz +0 -0
- package/data/manifest-9-6-0.json.gz +0 -0
- package/data/types.json.gz +0 -0
- package/dist/types.d.ts +47 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,10 +16,12 @@ npm install @idfkit/schemas
|
|
|
16
16
|
The raw epJSON schemas are ~10 MB each, 17 of them, 11.9 MB gzipped in total. In
|
|
17
17
|
a Python wheel nobody notices. On a page load it decides your architecture.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
The 17 manifests name 14,092 object-type definitions between them, and only
|
|
20
|
+
2,568 of those are distinct. 82% of what the releases carry is a byte-identical
|
|
21
|
+
repeat of a definition another release already has: `Construction`, for
|
|
22
|
+
instance, has changed once in 17 releases. So this package stores each unique
|
|
23
|
+
definition once, keyed by a content hash, and gives every version a manifest
|
|
24
|
+
mapping type name to hash.
|
|
23
25
|
|
|
24
26
|
| | All 17 versions, gzipped |
|
|
25
27
|
| ---------------------------------------- | ------------------------ |
|
|
@@ -28,7 +30,7 @@ hash.
|
|
|
28
30
|
| Content-addressed (this package) | ~1,000 KB |
|
|
29
31
|
|
|
30
32
|
Splitting per version would have been the obvious move and is the wrong one: it
|
|
31
|
-
duplicates the shared
|
|
33
|
+
duplicates the shared 82% across packages and makes cross-version work require
|
|
32
34
|
several installs. The longer argument is in [Content-addressed
|
|
33
35
|
schemas](https://js.idfkit.com/explanation/content-addressed-schemas/).
|
|
34
36
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/data/types.json.gz
CHANGED
|
Binary file
|
package/dist/types.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* This is deliberately NOT the raw epJSON schema. Keys are single letters and
|
|
5
5
|
* documentation metadata (`note`, `ip-units`, `field_info`) is dropped, because
|
|
6
6
|
* this bundle is on the critical path of every parse and, in a browser, every
|
|
7
|
-
* page load.
|
|
8
|
-
*
|
|
7
|
+
* page load. This package republishes that metadata nowhere; tooling that
|
|
8
|
+
* renders documentation reads the raw epJSON schemas directly, or uses
|
|
9
|
+
* idfkit-docs (https://docs.idfkit.com).
|
|
9
10
|
*/
|
|
10
11
|
/** Field storage class, mirroring how the IDF writer must format the value. */
|
|
11
12
|
export type FieldKind =
|
|
@@ -20,22 +21,59 @@ export type FieldKind =
|
|
|
20
21
|
export interface SlimField {
|
|
21
22
|
/** Storage class. */
|
|
22
23
|
t: FieldKind;
|
|
23
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Field is an `anyOf` of a numeric branch and a string branch, in that order.
|
|
26
|
+
*
|
|
27
|
+
* Set for every one of the 13060 such fields across the 17 bundled versions.
|
|
28
|
+
* The numeric branch's type, enum and bounds are hoisted onto this record;
|
|
29
|
+
* the string branch survives as `se`.
|
|
30
|
+
*/
|
|
24
31
|
auto?: 1;
|
|
32
|
+
/**
|
|
33
|
+
* String literals the `anyOf` string branch accepts, verbatim from the schema.
|
|
34
|
+
*
|
|
35
|
+
* Only meaningful together with `auto`. Absent while `auto` is set means the
|
|
36
|
+
* string branch carries no enum at all and ANY string is legal there, which is
|
|
37
|
+
* the shape of 646 fields including `Schedule:Compact`'s extensible `field`.
|
|
38
|
+
* That is why the empty string is kept here rather than filtered out the way
|
|
39
|
+
* `e` filters it: `se: ['']` (the whole string branch of the 68 fields whose
|
|
40
|
+
* number branch carries a numeric enum) and no `se` at all mean the opposite
|
|
41
|
+
* of one another.
|
|
42
|
+
*
|
|
43
|
+
* The sentinel is not a constant: 10565 fields take `Autosize` and 1781 take
|
|
44
|
+
* `Autocalculate`, so a validator that accepts either everywhere accepts a
|
|
45
|
+
* value EnergyPlus rejects.
|
|
46
|
+
*/
|
|
47
|
+
se?: string[];
|
|
25
48
|
/** Names of reference lists this field points *into* (i.e. it is a foreign key). */
|
|
26
49
|
ol?: string[];
|
|
27
50
|
/** Names of reference lists this field contributes *to* (i.e. it is a key). */
|
|
28
51
|
ref?: string[];
|
|
29
|
-
/**
|
|
30
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Permitted values for a choice field.
|
|
54
|
+
*
|
|
55
|
+
* Numbers, not strings, on the 68 fields across the versions that express a
|
|
56
|
+
* choice numerically (`e: [1, 3]` on `Site:GroundDomain:Slab.phase`). Compare
|
|
57
|
+
* strings case-insensitively and numbers by value.
|
|
58
|
+
*/
|
|
59
|
+
e?: (string | number)[];
|
|
31
60
|
/** Schema default, applied on write when the field is absent. */
|
|
32
61
|
d?: string | number;
|
|
33
62
|
min?: number;
|
|
34
63
|
max?: number;
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Exclusive minimum, in whichever JSON Schema dialect the version shipped.
|
|
66
|
+
*
|
|
67
|
+
* A number is the bound itself (draft-06+, 9.6.0 onwards). The boolean `true`
|
|
68
|
+
* qualifies the sibling `min`, making it exclusive (draft-04, 8.9.0 through
|
|
69
|
+
* 9.5.0). Measured across the bundled schemas: `xmin` is boolean 9013 times
|
|
70
|
+
* in the older seven versions and numeric 13840 times in the newer ten;
|
|
71
|
+
* `xmax` behaves identically, and no version mixes the two. Branch on the
|
|
72
|
+
* value's type, never on the version.
|
|
73
|
+
*/
|
|
74
|
+
xmin?: number | boolean;
|
|
75
|
+
/** Exclusive maximum. Number or boolean, exactly as `xmin`. */
|
|
76
|
+
xmax?: number | boolean;
|
|
39
77
|
/** SI units, used by the unit-conversion helpers. */
|
|
40
78
|
u?: string;
|
|
41
79
|
/** Value is case-sensitive and must not be normalized. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,MAAM,MAAM,SAAS;AACnB,+BAA+B;AAC7B,GAAG;AACL,oDAAoD;GAClD,GAAG;AACL,gDAAgD;GAC9C,GAAG;AACL,gCAAgC;GAC9B,KAAK,CAAC;AAEV,MAAM,WAAW,SAAS;IACxB,qBAAqB;IACrB,CAAC,EAAE,SAAS,CAAC;IACb;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC;IACT;;;;;;;;;;;;;;OAcG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,oFAAoF;IACpF,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,+EAA+E;IAC/E,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,CAAC,MAAM,GAA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W;IAC1B,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC"}
|
package/dist/types.js
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* This is deliberately NOT the raw epJSON schema. Keys are single letters and
|
|
5
5
|
* documentation metadata (`note`, `ip-units`, `field_info`) is dropped, because
|
|
6
6
|
* this bundle is on the critical path of every parse and, in a browser, every
|
|
7
|
-
* page load.
|
|
8
|
-
*
|
|
7
|
+
* page load. This package republishes that metadata nowhere; tooling that
|
|
8
|
+
* renders documentation reads the raw epJSON schemas directly, or uses
|
|
9
|
+
* idfkit-docs (https://docs.idfkit.com).
|
|
9
10
|
*/
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|