@kensnzk/koyu 0.5.0

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 (61) hide show
  1. package/.github/workflows/ci.yml +16 -0
  2. package/.zenodo.json +20 -0
  3. package/CITATION.cff +26 -0
  4. package/LICENSE +73 -0
  5. package/NOTICE +2 -0
  6. package/README.ja.md +71 -0
  7. package/README.md +72 -0
  8. package/docs/decisions/0001-notation-v0.md +29 -0
  9. package/docs/decisions/0002-height-and-offsets.md +27 -0
  10. package/docs/decisions/0003-uncounted-divisions.md +36 -0
  11. package/docs/decisions/0004-typical-floors.md +21 -0
  12. package/docs/decisions/0005-zones-and-unions.md +23 -0
  13. package/docs/decisions/0006-voids-and-light.md +31 -0
  14. package/docs/decisions/0007-semi-outdoor-air.md +27 -0
  15. package/docs/decisions/0008-vocabulary-and-level-attr.md +23 -0
  16. package/docs/decisions/0009-site-and-exterior.md +29 -0
  17. package/docs/ifc-coverage.md +82 -0
  18. package/docs/ifcx-notes.md +25 -0
  19. package/docs/img/house-L1.svg +80 -0
  20. package/docs/img/house-L2.svg +53 -0
  21. package/docs/img/mansion-L1.svg +113 -0
  22. package/docs/img/mansion-L10.svg +111 -0
  23. package/docs/img/mansion-L5.svg +160 -0
  24. package/docs/img/office-L1.svg +116 -0
  25. package/docs/img/office-L2.svg +109 -0
  26. package/docs/img/two-rooms.svg +39 -0
  27. package/docs/log/2026-07-22.md +13 -0
  28. package/docs/log/2026-07-23.md +51 -0
  29. package/docs/roadmap.md +55 -0
  30. package/docs/writing-architecture.md +119 -0
  31. package/examples/comparison/README.md +38 -0
  32. package/examples/comparison/gen-ifc4.ts +133 -0
  33. package/examples/comparison/gen-ifcx.ts +134 -0
  34. package/examples/comparison/two-rooms.ifc +152 -0
  35. package/examples/comparison/two-rooms.ifcx +1030 -0
  36. package/examples/comparison/validate-ifc.ts +33 -0
  37. package/examples/house.muro +89 -0
  38. package/examples/mansion.muro +187 -0
  39. package/examples/office.muro +110 -0
  40. package/examples/two-rooms.canonical.json +111 -0
  41. package/examples/two-rooms.muro +22 -0
  42. package/package.json +33 -0
  43. package/spec/notation-v0.md +164 -0
  44. package/spec/vocabulary.md +62 -0
  45. package/src/check.ts +302 -0
  46. package/src/cli.ts +281 -0
  47. package/src/graph.ts +306 -0
  48. package/src/index.ts +8 -0
  49. package/src/light.ts +66 -0
  50. package/src/model.ts +367 -0
  51. package/src/parse.ts +512 -0
  52. package/src/plan.ts +334 -0
  53. package/src/site.ts +82 -0
  54. package/test/core.test.ts +171 -0
  55. package/test/design2.test.ts +97 -0
  56. package/test/house.test.ts +74 -0
  57. package/test/mansion.test.ts +99 -0
  58. package/test/office.test.ts +71 -0
  59. package/test/uncounted.test.ts +120 -0
  60. package/test/vertical.test.ts +75 -0
  61. package/tsconfig.json +13 -0
@@ -0,0 +1,74 @@
1
+ // 戸建住宅 — メゾネット機構 (level:属性でパス=集計の階層)・部分吹抜け・開き勝手
2
+
3
+ import assert from "node:assert/strict";
4
+ import { readFileSync } from "node:fs";
5
+ import { test } from "node:test";
6
+ import { fileURLToPath } from "node:url";
7
+ import { check } from "../src/check.js";
8
+ import { doorsBetween } from "../src/graph.js";
9
+ import { isSemiOutdoor, zoneAreaM2 } from "../src/model.js";
10
+ import { parse } from "../src/parse.js";
11
+ import { siteReport } from "../src/site.js";
12
+
13
+ const src = readFileSync(
14
+ fileURLToPath(new URL("../examples/house.muro", import.meta.url)),
15
+ "utf8",
16
+ );
17
+
18
+ test("メゾネット: /home のゾーンが level: 属性で2つの階を跨ぐ", () => {
19
+ const m = parse(src);
20
+ assert.equal(m.spaces.get("/home/ldk")!.level, "L1");
21
+ assert.equal(m.spaces.get("/home/bed1")!.level, "L2");
22
+ assert.equal(zoneAreaM2(m, "/home"), 92.75); // 階を跨いだ住戸の面積 (吹抜けは不算入)
23
+ });
24
+
25
+ test("整合チェックが警告ゼロで通る (部分吹抜け含む)", () => {
26
+ const m = parse(src);
27
+ const r = check(m);
28
+ assert.deepEqual(r.errors, []);
29
+ assert.deepEqual(r.warnings, []);
30
+ });
31
+
32
+ test("避難: 2階の寝室から道路まで扉3枚 (室内扉・玄関・門扉)、庭を通る", () => {
33
+ const m = parse(src);
34
+ const route = doorsBetween(m, "/home/bed1", "/out/road")!;
35
+ assert.equal(route.doors, 3);
36
+ assert.ok(route.path.includes("/home/hall1"));
37
+ assert.ok(route.path.includes("/site/garden"));
38
+ });
39
+
40
+ test("敷地の問い: 宣言面積=導出面積、接道10.28m、建蔽率42%", () => {
41
+ const m = parse(src);
42
+ const r = siteReport(m);
43
+ assert.equal(r.declaredArea, 126.24);
44
+ assert.equal(r.derivedArea, 126.24); // 庭のタイル+建物投影の合併が宣言と一致
45
+ assert.equal(r.roads.length, 1);
46
+ assert.equal(r.roads[0]!.frontage, 10280); // 建物外壁が道路に面する分は数えない
47
+ assert.equal(r.footprint, 53);
48
+ assert.equal(Math.round((r.footprint / r.declaredArea!) * 1000) / 10, 42);
49
+ });
50
+
51
+ test("庭は半屋外 (塀はair:1 — 外気を遮らない)、採光は庭越しでも1.0 (上が開いている)", () => {
52
+ const m = parse(src);
53
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/site/garden")!), true);
54
+ // LDKの採光: 庭越し5.72 + 西通路越し1.815 = 7.54 (0.7掛けされない)
55
+ });
56
+
57
+ test("部分吹抜けで下階の天井高を階高超えにすると被覆率エラー", () => {
58
+ const m = parse(
59
+ src.replace("level:L1 name:LDK", "level:L1 h:5300 name:LDK"),
60
+ );
61
+ const r = check(m);
62
+ assert.ok(r.errors.some((e) => e.includes("被覆")));
63
+ });
64
+
65
+ test("未宣言のlevel:はエラー", () => {
66
+ assert.throws(() => parse(src.replace("level:L2 name:主寝室", "level:L9 name:主寝室")), /未宣言のレベル/);
67
+ });
68
+
69
+ test("hingeの軸が線分に合わなければエラー", () => {
70
+ // ldk|hall1 の扉は垂直線分 (edge:E) — hinge:W は水平用なので合わない
71
+ const m = parse(src.replace("hinge:S swing:b", "hinge:W swing:b"));
72
+ const r = check(m);
73
+ assert.ok(r.errors.some((e) => e.includes("垂直線分")));
74
+ });
@@ -0,0 +1,99 @@
1
+ // 10階建て内廊下型集合住宅 — 基準階の反復 (スパン展開とstack) の検証
2
+
3
+ import assert from "node:assert/strict";
4
+ import { readFileSync } from "node:fs";
5
+ import { test } from "node:test";
6
+ import { fileURLToPath } from "node:url";
7
+ import { check } from "../src/check.js";
8
+ import { doorsBetween } from "../src/graph.js";
9
+ import { areaM2, effectiveUse, isSemiOutdoor, zoneAreaM2 } from "../src/model.js";
10
+ import { parse } from "../src/parse.js";
11
+
12
+ const src = readFileSync(
13
+ fileURLToPath(new URL("../examples/mansion.muro", import.meta.url)),
14
+ "utf8",
15
+ );
16
+
17
+ test("200行たらずのテキストが10フロア122空間に展開される", () => {
18
+ const m = parse(src);
19
+ assert.ok(src.split("\n").length < 200);
20
+ assert.equal(m.spaces.size, 122);
21
+ assert.equal(m.boundaries.length, 332);
22
+ assert.equal(Object.keys(m.levels).length, 11); // L1..L10 + R (範囲宣言L3..L9は7レベル)
23
+ assert.equal(m.zones.size, 8); // Aタイプのゾーン × L2..L9
24
+ });
25
+
26
+ test("基準階の展開: どの階も同じ割付、レベルのzはpitchで積まれる", () => {
27
+ const m = parse(src);
28
+ assert.deepEqual(m.spaces.get("/L5/A/ldk")!.rects, m.spaces.get("/L2/A/ldk")!.rects);
29
+ assert.deepEqual(m.spaces.get("/L9/E")!.rects, m.spaces.get("/L3/E")!.rects);
30
+ assert.equal(m.levels["L5"]!.z, 12500); // 6700 + 2900×2
31
+ assert.equal(m.levels["L9"]!.z, 24100);
32
+ });
33
+
34
+ test("stackの展開: EVシャフト9本・階段9本の垂直境界", () => {
35
+ const m = parse(src);
36
+ assert.equal(m.boundaries.filter((b) => b.kind === "shaft").length, 9);
37
+ assert.equal(m.boundaries.filter((b) => b.kind === "stair").length, 9);
38
+ });
39
+
40
+ test("整合チェックが警告ゼロで通る (10フロアぶんの高さ不変量含む)", () => {
41
+ const m = parse(src);
42
+ const r = check(m);
43
+ assert.deepEqual(r.errors, []);
44
+ assert.deepEqual(r.warnings, []);
45
+ });
46
+
47
+ test("避難の問い: 9階のLDKから地上まで扉3枚 (室内扉・玄関・階段防火戸)", () => {
48
+ const m = parse(src);
49
+ const route = doorsBetween(m, "/L9/A/ldk", "/out")!;
50
+ assert.equal(route.doors, 3);
51
+ assert.equal(route.path.at(-2), "/L1/stair"); // 屋外階段で地上へ、最後は開放
52
+ // EVシャフトは通れないので、EVからも階段迂回
53
+ const ev = doorsBetween(m, "/L5/ev", "/out")!;
54
+ assert.ok(ev.path.includes("/L5/corridor"));
55
+ });
56
+
57
+ test("2階の洋室から9階の洋室へは扉8枚", () => {
58
+ const m = parse(src);
59
+ assert.equal(doorsBetween(m, "/L2/A/bedroom", "/L9/A/bedroom")!.doors, 8);
60
+ });
61
+
62
+ test("面積: 専有1704㎡ — 間取りに割っても、バルコニーが付いても不変", () => {
63
+ const m = parse(src);
64
+ const exclusive = [...m.spaces.values()]
65
+ .filter((s) => effectiveUse(m, s) === "exclusive" && !isSemiOutdoor(m, s))
66
+ .reduce((sum, s) => sum + (areaM2(s) ?? 0), 0);
67
+ assert.equal(Math.round(exclusive * 100) / 100, 1704);
68
+ assert.equal(zoneAreaM2(m, "/L5/A"), 34.8); // 住戸=ゾーンの面積は室の合計 (半屋外は数えない)
69
+ });
70
+
71
+ test("半屋外は導出される: バルコニー・屋外階段は半屋外、内廊下は違う", () => {
72
+ const m = parse(src);
73
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/L5/A/balcony")!), true);
74
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/L5/stair")!), true);
75
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/L10/terrace")!), true);
76
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/L5/corridor")!), false); // 内廊下
77
+ assert.equal(isSemiOutdoor(m, m.spaces.get("/L5/A/ldk")!), false); // バルコニーの内側
78
+ });
79
+
80
+ test("一行の中で異なるレベル範囲は使えない", () => {
81
+ assert.throws(
82
+ () =>
83
+ parse(`
84
+ grid X 0 3600 7200
85
+ grid Y 0 4500
86
+ level L1 0 h:2700
87
+ level L2 3000 h:2400 slab:600
88
+ level L3 6000 h:2400 slab:600
89
+ space /L1..L2/a room X1..X2 Y1..Y2
90
+ space /L2..L3/b room X2..X3 Y1..Y2
91
+ boundary /L1..L2/a /L2..L3/b t:120
92
+ `),
93
+ /レベル範囲は揃えます/,
94
+ );
95
+ });
96
+
97
+ test("レベル範囲の宣言には pitch が要る", () => {
98
+ assert.throws(() => parse("level L2..L5 3000 h:2400"), /pitch/);
99
+ });
@@ -0,0 +1,71 @@
1
+ import assert from "node:assert/strict";
2
+ import { readFileSync } from "node:fs";
3
+ import { test } from "node:test";
4
+ import { fileURLToPath } from "node:url";
5
+ import { check } from "../src/check.js";
6
+ import { doorsBetween } from "../src/graph.js";
7
+ import { areaM2 } from "../src/model.js";
8
+ import { parse } from "../src/parse.js";
9
+ import { svgPlan } from "../src/plan.js";
10
+
11
+ const src = readFileSync(
12
+ fileURLToPath(new URL("../examples/office.muro", import.meta.url)),
13
+ "utf8",
14
+ );
15
+
16
+ test("オフィス2フロアが読める", () => {
17
+ const m = parse(src);
18
+ assert.equal(m.spaces.size, 17);
19
+ assert.equal(m.boundaries.length, 43);
20
+ assert.equal(Object.keys(m.levels).length, 3);
21
+ });
22
+
23
+ test("通り芯からのオフセットが解決される", () => {
24
+ const m = parse(src);
25
+ // X1+3200 / X2+3000 のオフセット壁
26
+ assert.deepEqual(m.spaces.get("/L1/stair")!.rects, [
27
+ { x1: 0, y1: 8000, x2: 3200, y2: 12000 },
28
+ ]);
29
+ assert.deepEqual(m.spaces.get("/L1/wc-w")!.rects, [
30
+ { x1: 9400, y1: 8000, x2: 12800, y2: 12000 },
31
+ ]);
32
+ });
33
+
34
+ test("整合チェックが警告ゼロで通る (高さの不変量含む)", () => {
35
+ const m = parse(src);
36
+ const r = check(m);
37
+ assert.deepEqual(r.errors, []);
38
+ assert.deepEqual(r.warnings, []);
39
+ });
40
+
41
+ test("避難の問い: 2階の執務室から外へ扉4枚、階段経由", () => {
42
+ const m = parse(src);
43
+ const route = doorsBetween(m, "/L2/office", "/out")!;
44
+ assert.equal(route.doors, 4);
45
+ assert.ok(route.path.includes("/L2/stair"));
46
+ assert.ok(route.path.includes("/L1/stair"));
47
+ // 1階の事務室からは2枚 (廊下→ホールはopenで0)
48
+ assert.equal(doorsBetween(m, "/L1/office", "/out")!.doors, 2);
49
+ });
50
+
51
+ test("EVシャフトは繋がるが通れない — 経路は階段に迂回する", () => {
52
+ const m = parse(src);
53
+ const route = doorsBetween(m, "/L1/ev", "/L2/ev")!;
54
+ assert.equal(route.doors, 4);
55
+ assert.ok(route.path.includes("/L1/stair")); // shaft直行 (扉0) ではなく階段経由
56
+ });
57
+
58
+ test("面積: フロア230.4㎡×2", () => {
59
+ const m = parse(src);
60
+ const total = [...m.spaces.values()]
61
+ .map((s) => areaM2(s) ?? 0)
62
+ .reduce((a, b) => a + b, 0);
63
+ assert.equal(Math.round(total * 100) / 100, 460.8);
64
+ });
65
+
66
+ test("レベル別の平面図が出る", () => {
67
+ const m = parse(src);
68
+ const l2 = svgPlan(m, { level: "L2" });
69
+ assert.ok(l2.includes("執務室"));
70
+ assert.ok(!l2.includes("エントランスホール")); // L1の室はL2平面に出ない
71
+ });
@@ -0,0 +1,120 @@
1
+ // 数えない分節 (area / seg) — ADR-0003
2
+ // 隔離則: 面積・室数・グラフに一切影響しないことをここで保証する
3
+
4
+ import assert from "node:assert/strict";
5
+ import { readFileSync } from "node:fs";
6
+ import { test } from "node:test";
7
+ import { fileURLToPath } from "node:url";
8
+ import { check } from "../src/check.js";
9
+ import { doorsBetween } from "../src/graph.js";
10
+ import { areaM2, toCanonical } from "../src/model.js";
11
+ import { parse } from "../src/parse.js";
12
+ import { svgPlan } from "../src/plan.js";
13
+
14
+ const src = readFileSync(
15
+ fileURLToPath(new URL("../examples/office.muro", import.meta.url)),
16
+ "utf8",
17
+ );
18
+
19
+ const BASE = `
20
+ grid X 0 3600 7200
21
+ grid Y 0 4500
22
+ level L1 0 h:2700
23
+ `;
24
+
25
+ test("area/segが読める", () => {
26
+ const m = parse(src);
27
+ const hall = m.spaces.get("/L1/hall")!;
28
+ assert.equal(hall.areas.length, 1);
29
+ assert.deepEqual(hall.areas[0]!.rect, { x1: 0, y1: 0, x2: 1800, y2: 6400 });
30
+ assert.equal(hall.areas[0]!.attrs["floor"], "モルタル");
31
+ const oc = m.boundaries.find((b) => b.a === "/L1/office" && b.b === "/L1/corridor")!;
32
+ assert.equal(oc.segs.length, 1);
33
+ assert.equal(oc.segs[0]!.attrs["spec"], "ガラスパーティション");
34
+ });
35
+
36
+ test("隔離則: 面積は変わらない — 室は割れていない", () => {
37
+ const m = parse(src);
38
+ assert.equal(areaM2(m.spaces.get("/L1/hall")!), 40.96); // 土間があってもホールは40.96のまま
39
+ assert.equal(areaM2(m.spaces.get("/L2/office")!), 102.4);
40
+ assert.equal(m.spaces.size, 17); // 室数も変わらない
41
+ });
42
+
43
+ test("隔離則: グラフも変わらない", () => {
44
+ const m = parse(src);
45
+ assert.equal(doorsBetween(m, "/L2/office", "/out")!.doors, 4);
46
+ assert.equal(doorsBetween(m, "/L1/office", "/out")!.doors, 2);
47
+ });
48
+
49
+ test("checkは警告ゼロのまま", () => {
50
+ const m = parse(src);
51
+ const r = check(m);
52
+ assert.deepEqual(r.errors, []);
53
+ assert.deepEqual(r.warnings, []);
54
+ });
55
+
56
+ test("平面図に土間とガラス区間が現れる", () => {
57
+ const m = parse(src);
58
+ const l1 = svgPlan(m, { level: "L1" });
59
+ assert.ok(l1.includes("土間"));
60
+ assert.ok(l1.includes("ガラスパーティション"));
61
+ });
62
+
63
+ test("正準JSONにareasとsegsが乗る", () => {
64
+ const j = toCanonical(parse(src));
65
+ assert.ok(j.includes('"areas"'));
66
+ assert.ok(j.includes('"segs"'));
67
+ });
68
+
69
+ test("親からはみ出したareaは警告", () => {
70
+ const m = parse(`${BASE}
71
+ space /L1/a room X1..X2 Y1..Y2
72
+ area X1..X3 Y1..Y2 floor:畳
73
+ `);
74
+ const r = check(m);
75
+ assert.ok(r.warnings.some((w) => w.includes("はみ出し")));
76
+ });
77
+
78
+ test("領域を持たない空間のareaはエラー", () => {
79
+ const m = parse(`${BASE}
80
+ space /out exterior
81
+ area X1..X2 Y1..Y2 floor:砂利
82
+ `);
83
+ const r = check(m);
84
+ assert.ok(r.errors.some((e) => e.includes("area は書けません")));
85
+ });
86
+
87
+ test("線分より広いsegはエラー", () => {
88
+ const m = parse(`${BASE}
89
+ space /L1/a room X1..X2 Y1..Y2
90
+ space /L1/b room X2..X3 Y1..Y2
91
+ boundary /L1/a /L1/b t:120
92
+ seg w:99999 spec:RC
93
+ `);
94
+ const r = check(m);
95
+ assert.ok(r.errors.some((e) => e.includes("超えて")));
96
+ });
97
+
98
+ test("open境界のsegは警告", () => {
99
+ const m = parse(`${BASE}
100
+ space /L1/a room X1..X2 Y1..Y2
101
+ space /L1/b room X2..X3 Y1..Y2
102
+ boundary /L1/a /L1/b type:open
103
+ seg w:1000 spec:RC
104
+ `);
105
+ const r = check(m);
106
+ assert.ok(r.warnings.some((w) => w.includes("open境界")));
107
+ });
108
+
109
+ test("spaceの直下でないareaはエラー", () => {
110
+ assert.throws(
111
+ () =>
112
+ parse(`${BASE}
113
+ space /L1/a room X1..X2 Y1..Y2
114
+ space /L1/b room X2..X3 Y1..Y2
115
+ boundary /L1/a /L1/b t:120
116
+ area X1..X2 Y1..Y2 floor:畳
117
+ `),
118
+ /space の直下/,
119
+ );
120
+ });
@@ -0,0 +1,75 @@
1
+ import assert from "node:assert/strict";
2
+ import { test } from "node:test";
3
+ import { check } from "../src/check.js";
4
+ import { doorsBetween } from "../src/graph.js";
5
+ import { parse } from "../src/parse.js";
6
+
7
+ const BASE = `
8
+ grid X 0 3600 7200
9
+ grid Y 0 4500
10
+ `;
11
+
12
+ test("天井高 + 上階slab > 階高 は食い込みエラー", () => {
13
+ const m = parse(`${BASE}
14
+ level L1 0 h:2700
15
+ level L2 3000 slab:1300
16
+ space /L1/a room X1..X2 Y1..Y2
17
+ space /L2/b room X1..X2 Y1..Y2
18
+ `);
19
+ const r = check(m);
20
+ assert.ok(r.errors.some((e) => e.includes("食い込み")));
21
+ });
22
+
23
+ test("上階のslab未宣言は高さ検査不能の警告", () => {
24
+ const m = parse(`${BASE}
25
+ level L1 0 h:2700
26
+ level L2 4000
27
+ space /L1/a room X1..X2 Y1..Y2
28
+ space /L2/b room X1..X2 Y1..Y2
29
+ `);
30
+ const r = check(m);
31
+ assert.ok(r.warnings.some((w) => w.includes("slab")));
32
+ });
33
+
34
+ test("異なるレベル間に壁境界は書けない", () => {
35
+ const m = parse(`${BASE}
36
+ level L1 0 h:2700
37
+ level L2 4000 slab:1300
38
+ space /L1/a room X1..X2 Y1..Y2
39
+ space /L2/b room X1..X2 Y1..Y2
40
+ boundary /L1/a /L2/b t:120
41
+ `);
42
+ const r = check(m);
43
+ assert.ok(r.errors.some((e) => e.includes("異なるレベル")));
44
+ });
45
+
46
+ test("stair境界は平面で重なっていなければエラー", () => {
47
+ const m = parse(`${BASE}
48
+ level L1 0 h:2700
49
+ level L2 4000 slab:1300
50
+ space /L1/a room X1..X2 Y1..Y2
51
+ space /L2/b room X2..X3 Y1..Y2
52
+ boundary /L1/a /L2/b type:stair
53
+ `);
54
+ const r = check(m);
55
+ assert.ok(r.errors.some((e) => e.includes("重なって")));
56
+ });
57
+
58
+ test("stairは扉0枚で階をまたぐ", () => {
59
+ const m = parse(`${BASE}
60
+ level L1 0 h:2700
61
+ level L2 4000 slab:1300
62
+ space /L1/a room X1..X2 Y1..Y2
63
+ space /L2/b room X1..X2 Y1..Y2
64
+ boundary /L1/a /L2/b type:stair
65
+ `);
66
+ assert.equal(doorsBetween(m, "/L1/a", "/L2/b")!.doors, 0);
67
+ });
68
+
69
+ test("負のオフセットも書ける", () => {
70
+ const m = parse(`${BASE}
71
+ level L1 0 h:2700
72
+ space /L1/a room X1..X2-600 Y1..Y2
73
+ `);
74
+ assert.equal(m.spaces.get("/L1/a")!.rects[0]!.x2, 3000);
75
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "strict": true,
7
+ "noUncheckedIndexedAccess": true,
8
+ "skipLibCheck": true,
9
+ "noEmit": true,
10
+ "types": ["node"]
11
+ },
12
+ "include": ["src/**/*.ts", "test/**/*.ts"]
13
+ }