@orrery/core 0.2.1 → 0.4.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.
@@ -0,0 +1,33 @@
1
+ // src/kdt.ts
2
+ function isKoreanDaylightTime(year, month, day) {
3
+ if (year === 1987) {
4
+ if (month > 5 && month < 10) return true;
5
+ if (month === 5 && day >= 10) return true;
6
+ if (month === 10 && day <= 11) return true;
7
+ }
8
+ if (year === 1988) {
9
+ if (month > 5 && month < 10) return true;
10
+ if (month === 5 && day >= 8) return true;
11
+ if (month === 10 && day <= 9) return true;
12
+ }
13
+ return false;
14
+ }
15
+ function adjustKdtToKst(year, month, day, hour, minute) {
16
+ if (!isKoreanDaylightTime(year, month, day)) {
17
+ return { year, month, day, hour, minute };
18
+ }
19
+ hour -= 1;
20
+ if (hour < 0) {
21
+ hour += 24;
22
+ const d = new Date(year, month - 1, day - 1);
23
+ year = d.getFullYear();
24
+ month = d.getMonth() + 1;
25
+ day = d.getDate();
26
+ }
27
+ return { year, month, day, hour, minute };
28
+ }
29
+
30
+ export {
31
+ isKoreanDaylightTime,
32
+ adjustKdtToKst
33
+ };
@@ -47,60 +47,75 @@ function matchChosung(name, query) {
47
47
  }
48
48
  var KOREAN_CITIES = [
49
49
  // 특별/광역시
50
- { name: "\uC11C\uC6B8", lat: 37.5665, lon: 126.978 },
51
- { name: "\uBD80\uC0B0", lat: 35.1796, lon: 129.0756 },
52
- { name: "\uC778\uCC9C", lat: 37.4563, lon: 126.7052 },
53
- { name: "\uB300\uAD6C", lat: 35.8714, lon: 128.6014 },
54
- { name: "\uB300\uC804", lat: 36.3504, lon: 127.3845 },
55
- { name: "\uAD11\uC8FC", lat: 35.1595, lon: 126.8526 },
56
- { name: "\uC6B8\uC0B0", lat: 35.5384, lon: 129.3114 },
57
- { name: "\uC138\uC885", lat: 36.48, lon: 127.259 },
50
+ { name: "\uC11C\uC6B8", region: "\uC11C\uC6B8\uD2B9\uBCC4\uC2DC", lat: 37.5665, lon: 126.978 },
51
+ { name: "\uBD80\uC0B0", region: "\uBD80\uC0B0\uAD11\uC5ED\uC2DC", lat: 35.1796, lon: 129.0756 },
52
+ { name: "\uC778\uCC9C", region: "\uC778\uCC9C\uAD11\uC5ED\uC2DC", lat: 37.4563, lon: 126.7052 },
53
+ { name: "\uB300\uAD6C", region: "\uB300\uAD6C\uAD11\uC5ED\uC2DC", lat: 35.8714, lon: 128.6014 },
54
+ { name: "\uB300\uC804", region: "\uB300\uC804\uAD11\uC5ED\uC2DC", lat: 36.3504, lon: 127.3845 },
55
+ { name: "\uAD11\uC8FC", region: "\uAD11\uC8FC\uAD11\uC5ED\uC2DC", lat: 35.1595, lon: 126.8526 },
56
+ { name: "\uC6B8\uC0B0", region: "\uC6B8\uC0B0\uAD11\uC5ED\uC2DC", lat: 35.5384, lon: 129.3114 },
57
+ { name: "\uC138\uC885", region: "\uC138\uC885\uD2B9\uBCC4\uC790\uCE58\uC2DC", lat: 36.48, lon: 127.259 },
58
58
  // 경기도
59
- { name: "\uC218\uC6D0", lat: 37.2636, lon: 127.0286 },
60
- { name: "\uACE0\uC591", lat: 37.6584, lon: 126.832 },
61
- { name: "\uC6A9\uC778", lat: 37.2411, lon: 127.1776 },
62
- { name: "\uC131\uB0A8", lat: 37.4386, lon: 127.1378 },
63
- { name: "\uBD80\uCC9C", lat: 37.5034, lon: 126.766 },
64
- { name: "\uC548\uC0B0", lat: 37.3219, lon: 126.8309 },
65
- { name: "\uC548\uC591", lat: 37.3943, lon: 126.9568 },
66
- { name: "\uB0A8\uC591\uC8FC", lat: 37.636, lon: 127.2165 },
67
- { name: "\uD654\uC131", lat: 37.1996, lon: 126.8312 },
68
- { name: "\uD3C9\uD0DD", lat: 36.9921, lon: 127.0857 },
69
- { name: "\uC758\uC815\uBD80", lat: 37.7381, lon: 127.0338 },
70
- { name: "\uC2DC\uD765", lat: 37.3801, lon: 126.8032 },
71
- { name: "\uD30C\uC8FC", lat: 37.759, lon: 126.7802 },
72
- { name: "\uAE40\uD3EC", lat: 37.6153, lon: 126.7156 },
73
- { name: "\uAD11\uBA85", lat: 37.4786, lon: 126.8646 },
74
- { name: "\uC774\uCC9C", lat: 37.272, lon: 127.435 },
59
+ { name: "\uC218\uC6D0", region: "\uACBD\uAE30\uB3C4", lat: 37.2636, lon: 127.0286 },
60
+ { name: "\uACE0\uC591", region: "\uACBD\uAE30\uB3C4", lat: 37.6584, lon: 126.832 },
61
+ { name: "\uC6A9\uC778", region: "\uACBD\uAE30\uB3C4", lat: 37.2411, lon: 127.1776 },
62
+ { name: "\uC131\uB0A8", region: "\uACBD\uAE30\uB3C4", lat: 37.4386, lon: 127.1378 },
63
+ { name: "\uBD80\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 37.5034, lon: 126.766 },
64
+ { name: "\uC548\uC0B0", region: "\uACBD\uAE30\uB3C4", lat: 37.3219, lon: 126.8309 },
65
+ { name: "\uC548\uC591", region: "\uACBD\uAE30\uB3C4", lat: 37.3943, lon: 126.9568 },
66
+ { name: "\uB0A8\uC591\uC8FC", region: "\uACBD\uAE30\uB3C4", lat: 37.636, lon: 127.2165 },
67
+ { name: "\uD654\uC131", region: "\uACBD\uAE30\uB3C4", lat: 37.1996, lon: 126.8312 },
68
+ { name: "\uD3C9\uD0DD", region: "\uACBD\uAE30\uB3C4", lat: 36.9921, lon: 127.0857 },
69
+ { name: "\uC758\uC815\uBD80", region: "\uACBD\uAE30\uB3C4", lat: 37.7381, lon: 127.0338 },
70
+ { name: "\uC2DC\uD765", region: "\uACBD\uAE30\uB3C4", lat: 37.3801, lon: 126.8032 },
71
+ { name: "\uD30C\uC8FC", region: "\uACBD\uAE30\uB3C4", lat: 37.759, lon: 126.7802 },
72
+ { name: "\uAE40\uD3EC", region: "\uACBD\uAE30\uB3C4", lat: 37.6153, lon: 126.7156 },
73
+ { name: "\uAD11\uBA85", region: "\uACBD\uAE30\uB3C4", lat: 37.4786, lon: 126.8646 },
74
+ { name: "\uC774\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 37.272, lon: 127.435 },
75
+ { name: "\uAD70\uD3EC", region: "\uACBD\uAE30\uB3C4", lat: 37.3616, lon: 126.9351 },
76
+ { name: "\uD558\uB0A8", region: "\uACBD\uAE30\uB3C4", lat: 37.5393, lon: 127.2148 },
77
+ { name: "\uC624\uC0B0", region: "\uACBD\uAE30\uB3C4", lat: 37.1499, lon: 127.077 },
78
+ { name: "\uC591\uC8FC", region: "\uACBD\uAE30\uB3C4", lat: 37.7853, lon: 127.0456 },
79
+ { name: "\uAD6C\uB9AC", region: "\uACBD\uAE30\uB3C4", lat: 37.5943, lon: 127.1297 },
80
+ { name: "\uC548\uC131", region: "\uACBD\uAE30\uB3C4", lat: 37.008, lon: 127.2798 },
81
+ { name: "\uD3EC\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 37.8949, lon: 127.2003 },
82
+ { name: "\uC758\uC655", region: "\uACBD\uAE30\uB3C4", lat: 37.3449, lon: 126.9685 },
83
+ { name: "\uC5EC\uC8FC", region: "\uACBD\uAE30\uB3C4", lat: 37.2984, lon: 127.6373 },
84
+ { name: "\uC591\uD3C9", region: "\uACBD\uAE30\uB3C4", lat: 37.4914, lon: 127.4875 },
85
+ { name: "\uB3D9\uB450\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 37.9034, lon: 127.0606 },
86
+ { name: "\uACFC\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 37.4292, lon: 126.9876 },
87
+ { name: "\uAD11\uC8FC", region: "\uACBD\uAE30\uB3C4", lat: 37.4095, lon: 127.255 },
88
+ { name: "\uC5F0\uCC9C", region: "\uACBD\uAE30\uB3C4", lat: 38.0965, lon: 127.075 },
89
+ { name: "\uAC00\uD3C9", region: "\uACBD\uAE30\uB3C4", lat: 37.8315, lon: 127.5095 },
75
90
  // 강원도
76
- { name: "\uCD98\uCC9C", lat: 37.8813, lon: 127.7299 },
77
- { name: "\uC6D0\uC8FC", lat: 37.3422, lon: 127.9202 },
78
- { name: "\uAC15\uB989", lat: 37.7519, lon: 128.8761 },
79
- { name: "\uC18D\uCD08", lat: 38.207, lon: 128.5918 },
91
+ { name: "\uCD98\uCC9C", region: "\uAC15\uC6D0\uB3C4", lat: 37.8813, lon: 127.7299 },
92
+ { name: "\uC6D0\uC8FC", region: "\uAC15\uC6D0\uB3C4", lat: 37.3422, lon: 127.9202 },
93
+ { name: "\uAC15\uB989", region: "\uAC15\uC6D0\uB3C4", lat: 37.7519, lon: 128.8761 },
94
+ { name: "\uC18D\uCD08", region: "\uAC15\uC6D0\uB3C4", lat: 38.207, lon: 128.5918 },
80
95
  // 충청도
81
- { name: "\uCCAD\uC8FC", lat: 36.6424, lon: 127.489 },
82
- { name: "\uCC9C\uC548", lat: 36.8152, lon: 127.1139 },
83
- { name: "\uCDA9\uC8FC", lat: 36.991, lon: 127.9259 },
84
- { name: "\uC81C\uCC9C", lat: 37.1326, lon: 128.191 },
85
- { name: "\uC544\uC0B0", lat: 36.7898, lon: 127.0018 },
96
+ { name: "\uCCAD\uC8FC", region: "\uCDA9\uCCAD\uBD81\uB3C4", lat: 36.6424, lon: 127.489 },
97
+ { name: "\uCC9C\uC548", region: "\uCDA9\uCCAD\uB0A8\uB3C4", lat: 36.8152, lon: 127.1139 },
98
+ { name: "\uCDA9\uC8FC", region: "\uCDA9\uCCAD\uBD81\uB3C4", lat: 36.991, lon: 127.9259 },
99
+ { name: "\uC81C\uCC9C", region: "\uCDA9\uCCAD\uBD81\uB3C4", lat: 37.1326, lon: 128.191 },
100
+ { name: "\uC544\uC0B0", region: "\uCDA9\uCCAD\uB0A8\uB3C4", lat: 36.7898, lon: 127.0018 },
86
101
  // 전라도
87
- { name: "\uC804\uC8FC", lat: 35.8242, lon: 127.148 },
88
- { name: "\uBAA9\uD3EC", lat: 34.8118, lon: 126.3922 },
89
- { name: "\uC5EC\uC218", lat: 34.7604, lon: 127.6622 },
90
- { name: "\uC21C\uCC9C", lat: 34.9505, lon: 127.4873 },
91
- { name: "\uAD70\uC0B0", lat: 35.9677, lon: 126.737 },
92
- { name: "\uC775\uC0B0", lat: 35.9483, lon: 126.9576 },
102
+ { name: "\uC804\uC8FC", region: "\uC804\uB77C\uBD81\uB3C4", lat: 35.8242, lon: 127.148 },
103
+ { name: "\uBAA9\uD3EC", region: "\uC804\uB77C\uB0A8\uB3C4", lat: 34.8118, lon: 126.3922 },
104
+ { name: "\uC5EC\uC218", region: "\uC804\uB77C\uB0A8\uB3C4", lat: 34.7604, lon: 127.6622 },
105
+ { name: "\uC21C\uCC9C", region: "\uC804\uB77C\uB0A8\uB3C4", lat: 34.9505, lon: 127.4873 },
106
+ { name: "\uAD70\uC0B0", region: "\uC804\uB77C\uBD81\uB3C4", lat: 35.9677, lon: 126.737 },
107
+ { name: "\uC775\uC0B0", region: "\uC804\uB77C\uBD81\uB3C4", lat: 35.9483, lon: 126.9576 },
93
108
  // 경상도
94
- { name: "\uD3EC\uD56D", lat: 36.019, lon: 129.3435 },
95
- { name: "\uACBD\uC8FC", lat: 35.8562, lon: 129.2247 },
96
- { name: "\uAE40\uD574", lat: 35.2285, lon: 128.8894 },
97
- { name: "\uCC3D\uC6D0", lat: 35.2281, lon: 128.6811 },
98
- { name: "\uC9C4\uC8FC", lat: 35.1798, lon: 128.1076 },
99
- { name: "\uAD6C\uBBF8", lat: 36.1197, lon: 128.3446 },
100
- { name: "\uC548\uB3D9", lat: 36.5684, lon: 128.7294 },
109
+ { name: "\uD3EC\uD56D", region: "\uACBD\uC0C1\uBD81\uB3C4", lat: 36.019, lon: 129.3435 },
110
+ { name: "\uACBD\uC8FC", region: "\uACBD\uC0C1\uBD81\uB3C4", lat: 35.8562, lon: 129.2247 },
111
+ { name: "\uAE40\uD574", region: "\uACBD\uC0C1\uB0A8\uB3C4", lat: 35.2285, lon: 128.8894 },
112
+ { name: "\uCC3D\uC6D0", region: "\uACBD\uC0C1\uB0A8\uB3C4", lat: 35.2281, lon: 128.6811 },
113
+ { name: "\uC9C4\uC8FC", region: "\uACBD\uC0C1\uB0A8\uB3C4", lat: 35.1798, lon: 128.1076 },
114
+ { name: "\uAD6C\uBBF8", region: "\uACBD\uC0C1\uBD81\uB3C4", lat: 36.1197, lon: 128.3446 },
115
+ { name: "\uC548\uB3D9", region: "\uACBD\uC0C1\uBD81\uB3C4", lat: 36.5684, lon: 128.7294 },
101
116
  // 제주도
102
- { name: "\uC81C\uC8FC", lat: 33.4996, lon: 126.5312 },
103
- { name: "\uC11C\uADC0\uD3EC", lat: 33.2542, lon: 126.56 }
117
+ { name: "\uC81C\uC8FC", region: "\uC81C\uC8FC\uD2B9\uBCC4\uC790\uCE58\uB3C4", lat: 33.4996, lon: 126.5312 },
118
+ { name: "\uC11C\uADC0\uD3EC", region: "\uC81C\uC8FC\uD2B9\uBCC4\uC790\uCE58\uB3C4", lat: 33.2542, lon: 126.56 }
104
119
  ];
105
120
  var WORLD_CITIES = [
106
121
  // ── 동아시아 ──
@@ -297,8 +312,13 @@ var WORLD_CITIES = [
297
312
  { name: "\uC624\uD074\uB79C\uB4DC", country: "\uB274\uC9C8\uB79C\uB4DC", lat: -36.8485, lon: 174.7633 }
298
313
  ];
299
314
  var SEOUL = KOREAN_CITIES[0];
315
+ var AMBIGUOUS_NAMES = new Set(
316
+ KOREAN_CITIES.map((c) => c.name).filter((name, _, arr) => arr.indexOf(name) !== arr.lastIndexOf(name))
317
+ );
300
318
  function formatCityName(city) {
301
- return city.country ? `${city.name}, ${city.country}` : city.name;
319
+ if (city.country) return `${city.name}, ${city.country}`;
320
+ if (city.region && AMBIGUOUS_NAMES.has(city.name)) return `${city.name} (${city.region})`;
321
+ return city.name;
302
322
  }
303
323
  function filterCities(query) {
304
324
  const q = query.trim();
@@ -307,7 +327,7 @@ function filterCities(query) {
307
327
  const koreanResults = [];
308
328
  const worldResults = [];
309
329
  for (const city of KOREAN_CITIES) {
310
- if (chosung ? matchChosung(city.name, q) : city.name.includes(q)) {
330
+ if (chosung ? matchChosung(city.name, q) || city.region != null && matchChosung(city.region, q) : city.name.includes(q) || city.region != null && city.region.includes(q)) {
311
331
  koreanResults.push(city);
312
332
  }
313
333
  }
@@ -319,7 +339,7 @@ function filterCities(query) {
319
339
  if (label.includes(q)) worldResults.push(city);
320
340
  }
321
341
  }
322
- return [...koreanResults, ...worldResults].slice(0, 8);
342
+ return [...koreanResults, ...worldResults].slice(0, 20);
323
343
  }
324
344
 
325
345
  export {
package/dist/cities.d.ts CHANGED
@@ -4,6 +4,8 @@ interface City {
4
4
  name: string;
5
5
  /** 한국어 국가명 (국내 도시는 생략) */
6
6
  country?: string;
7
+ /** 한국어 광역 지역명 (예: '경기도', '강원도') */
8
+ region?: string;
7
9
  lat: number;
8
10
  lon: number;
9
11
  }
@@ -11,9 +13,9 @@ declare const KOREAN_CITIES: readonly City[];
11
13
  declare const WORLD_CITIES: readonly City[];
12
14
  /** 기본값: 서울 */
13
15
  declare const SEOUL: City;
14
- /** 도시 표시명 (예: "서울", "도쿄, 일본") */
16
+ /** 도시 표시명 (예: "서울", "광주 (경기도)", "도쿄, 일본") */
15
17
  declare function formatCityName(city: City): string;
16
- /** 쿼리로 도시 필터링 (최대 8개, 한국 도시 우선) */
18
+ /** 쿼리로 도시 필터링 (최대 20개, 한국 도시 우선) */
17
19
  declare function filterCities(query: string): City[];
18
20
 
19
21
  export { type City, KOREAN_CITIES, SEOUL, WORLD_CITIES, filterCities, formatCityName };
package/dist/cities.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  WORLD_CITIES,
5
5
  filterCities,
6
6
  formatCityName
7
- } from "./chunk-OCPJGMZC.js";
7
+ } from "./chunk-WOQT7EBV.js";
8
8
  import "./chunk-JSBRDJBE.js";
9
9
  export {
10
10
  KOREAN_CITIES,
@@ -27,11 +27,22 @@ declare const BRANCH_BREAKS: Record<string, string>;
27
27
  declare const BRANCH_HARMS: Record<string, string>;
28
28
  declare const BRANCH_PUNISHMENTS: Record<string, [string, string]>;
29
29
  declare const BRANCH_SELF_PUNISHMENTS: Set<string>;
30
+ declare const BRANCH_WONJIN: Record<string, string>;
31
+ declare const BRANCH_GWIMUN: Record<string, string>;
30
32
  declare const YANGIN_MAP: Record<string, string>;
31
33
  declare const BAEKHO_PILLARS: Set<string>;
32
34
  declare const GOEGANG_PILLARS: Set<string>;
35
+ declare const DOHWA_MAP: Record<string, string>;
36
+ declare const CHEONUL_MAP: Record<string, string[]>;
37
+ declare const CHEONDUK_MAP: Record<string, string>;
38
+ declare const WOLDUK_MAP: Record<string, string>;
39
+ declare const MUNCHANG_MAP: Record<string, string>;
40
+ declare const HONGYEOM_PILLARS: Set<string>;
41
+ declare const GEUMYEO_MAP: Record<string, string>;
33
42
  declare const METEOR_LOOKUP: Record<string, number>;
34
43
  declare const JIJANGGAN: Record<string, string>;
44
+ /** 6순(旬)별 공망 지지 쌍. 인덱스 = Math.trunc(HGANJI index / 10) */
45
+ declare const GONGMANG_TABLE: [string, string][];
35
46
  declare const HGANJI: string[];
36
47
  declare const PILLAR_NAMES: string[];
37
48
  declare const TIAN_GAN = "\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678";
@@ -54,4 +65,4 @@ declare const BRIGHTNESS_TABLE: Record<string, Record<string, string>>;
54
65
  declare const CHANGSHENG_START: Record<string, string>;
55
66
  declare const WU_HU_DUN_GAN: Record<string, string>;
56
67
 
57
- export { BAEKHO_PILLARS, BRANCH_BREAKS, BRANCH_CLASHES, BRANCH_COMBINES_6, BRANCH_ELEMENT, BRANCH_HARMS, BRANCH_PUNISHMENTS, BRANCH_SELF_PUNISHMENTS, BRIGHTNESS_TABLE, CHANGSHENG_START, DIRECTIONAL_COMPOSES, DIRECTIONAL_COMPOSE_ELEMENTS, DI_ZHI, EARTH, EARTH_KR, ELEMENT_HANJA, GOEGANG_PILLARS, HALF_COMPOSES, HGANJI, HUO_XING_START, JIJANGGAN, KUI_YUE_TABLE, LING_XING_START, LUCKY_STAR_NAMES, LU_CUN_TABLE, MAIN_STAR_NAMES, METEORS_12, METEOR_LOOKUP, NAYIN_TABLE, PALACE_NAMES, PILLAR_NAMES, RELATIONS, SHA_STAR_NAMES, SI_HUA_TABLE, SKY, SKY_KR, SPIRITS_12, STEM_CLASHES, STEM_COMBINES, STEM_INFO, TIANFU_SERIES_OFFSETS, TIAN_GAN, TIAN_MA_TABLE, TRIPLE_COMPOSES, TRIPLE_COMPOSE_ELEMENTS, WU_HU_DUN_GAN, WU_XING_JU_MAP, YANGGAN, YANGIN_MAP, ZIWEI_SERIES_OFFSETS };
68
+ export { BAEKHO_PILLARS, BRANCH_BREAKS, BRANCH_CLASHES, BRANCH_COMBINES_6, BRANCH_ELEMENT, BRANCH_GWIMUN, BRANCH_HARMS, BRANCH_PUNISHMENTS, BRANCH_SELF_PUNISHMENTS, BRANCH_WONJIN, BRIGHTNESS_TABLE, CHANGSHENG_START, CHEONDUK_MAP, CHEONUL_MAP, DIRECTIONAL_COMPOSES, DIRECTIONAL_COMPOSE_ELEMENTS, DI_ZHI, DOHWA_MAP, EARTH, EARTH_KR, ELEMENT_HANJA, GEUMYEO_MAP, GOEGANG_PILLARS, GONGMANG_TABLE, HALF_COMPOSES, HGANJI, HONGYEOM_PILLARS, HUO_XING_START, JIJANGGAN, KUI_YUE_TABLE, LING_XING_START, LUCKY_STAR_NAMES, LU_CUN_TABLE, MAIN_STAR_NAMES, METEORS_12, METEOR_LOOKUP, MUNCHANG_MAP, NAYIN_TABLE, PALACE_NAMES, PILLAR_NAMES, RELATIONS, SHA_STAR_NAMES, SI_HUA_TABLE, SKY, SKY_KR, SPIRITS_12, STEM_CLASHES, STEM_COMBINES, STEM_INFO, TIANFU_SERIES_OFFSETS, TIAN_GAN, TIAN_MA_TABLE, TRIPLE_COMPOSES, TRIPLE_COMPOSE_ELEMENTS, WOLDUK_MAP, WU_HU_DUN_GAN, WU_XING_JU_MAP, YANGGAN, YANGIN_MAP, ZIWEI_SERIES_OFFSETS };
package/dist/constants.js CHANGED
@@ -4,20 +4,28 @@ import {
4
4
  BRANCH_CLASHES,
5
5
  BRANCH_COMBINES_6,
6
6
  BRANCH_ELEMENT,
7
+ BRANCH_GWIMUN,
7
8
  BRANCH_HARMS,
8
9
  BRANCH_PUNISHMENTS,
9
10
  BRANCH_SELF_PUNISHMENTS,
11
+ BRANCH_WONJIN,
10
12
  BRIGHTNESS_TABLE,
11
13
  CHANGSHENG_START,
14
+ CHEONDUK_MAP,
15
+ CHEONUL_MAP,
12
16
  DIRECTIONAL_COMPOSES,
13
17
  DIRECTIONAL_COMPOSE_ELEMENTS,
14
18
  DI_ZHI,
19
+ DOHWA_MAP,
15
20
  EARTH,
16
21
  EARTH_KR,
17
22
  ELEMENT_HANJA,
23
+ GEUMYEO_MAP,
18
24
  GOEGANG_PILLARS,
25
+ GONGMANG_TABLE,
19
26
  HALF_COMPOSES,
20
27
  HGANJI,
28
+ HONGYEOM_PILLARS,
21
29
  HUO_XING_START,
22
30
  JIJANGGAN,
23
31
  KUI_YUE_TABLE,
@@ -27,6 +35,7 @@ import {
27
35
  MAIN_STAR_NAMES,
28
36
  METEORS_12,
29
37
  METEOR_LOOKUP,
38
+ MUNCHANG_MAP,
30
39
  NAYIN_TABLE,
31
40
  PALACE_NAMES,
32
41
  PILLAR_NAMES,
@@ -44,12 +53,13 @@ import {
44
53
  TIAN_MA_TABLE,
45
54
  TRIPLE_COMPOSES,
46
55
  TRIPLE_COMPOSE_ELEMENTS,
56
+ WOLDUK_MAP,
47
57
  WU_HU_DUN_GAN,
48
58
  WU_XING_JU_MAP,
49
59
  YANGGAN,
50
60
  YANGIN_MAP,
51
61
  ZIWEI_SERIES_OFFSETS
52
- } from "./chunk-VJDUZB5T.js";
62
+ } from "./chunk-EXYPMSUR.js";
53
63
  import "./chunk-JSBRDJBE.js";
54
64
  export {
55
65
  BAEKHO_PILLARS,
@@ -57,20 +67,28 @@ export {
57
67
  BRANCH_CLASHES,
58
68
  BRANCH_COMBINES_6,
59
69
  BRANCH_ELEMENT,
70
+ BRANCH_GWIMUN,
60
71
  BRANCH_HARMS,
61
72
  BRANCH_PUNISHMENTS,
62
73
  BRANCH_SELF_PUNISHMENTS,
74
+ BRANCH_WONJIN,
63
75
  BRIGHTNESS_TABLE,
64
76
  CHANGSHENG_START,
77
+ CHEONDUK_MAP,
78
+ CHEONUL_MAP,
65
79
  DIRECTIONAL_COMPOSES,
66
80
  DIRECTIONAL_COMPOSE_ELEMENTS,
67
81
  DI_ZHI,
82
+ DOHWA_MAP,
68
83
  EARTH,
69
84
  EARTH_KR,
70
85
  ELEMENT_HANJA,
86
+ GEUMYEO_MAP,
71
87
  GOEGANG_PILLARS,
88
+ GONGMANG_TABLE,
72
89
  HALF_COMPOSES,
73
90
  HGANJI,
91
+ HONGYEOM_PILLARS,
74
92
  HUO_XING_START,
75
93
  JIJANGGAN,
76
94
  KUI_YUE_TABLE,
@@ -80,6 +98,7 @@ export {
80
98
  MAIN_STAR_NAMES,
81
99
  METEORS_12,
82
100
  METEOR_LOOKUP,
101
+ MUNCHANG_MAP,
83
102
  NAYIN_TABLE,
84
103
  PALACE_NAMES,
85
104
  PILLAR_NAMES,
@@ -97,6 +116,7 @@ export {
97
116
  TIAN_MA_TABLE,
98
117
  TRIPLE_COMPOSES,
99
118
  TRIPLE_COMPOSE_ELEMENTS,
119
+ WOLDUK_MAP,
100
120
  WU_HU_DUN_GAN,
101
121
  WU_XING_JU_MAP,
102
122
  YANGGAN,
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  export { calculateSaju } from './saju.js';
2
2
  export { calculateLiunian, createChart, getDaxianList } from './ziwei.js';
3
- export { ASPECT_SYMBOLS, HOUSE_SYSTEMS, PLANET_KO, PLANET_SYMBOLS, ROMAN, ZODIAC_KO, ZODIAC_SIGNS, ZODIAC_SYMBOLS, calculateNatal, formatDegree, getSwissEph, lonToSign, normalizeDeg } from './natal.js';
4
- export { analyzeAllRelations, analyzePillarRelations, calcPillarIndices, calcSolarTerms, checkDirectionalCompose, checkTripleCompose, findTransits, getBranchRelation, getDaewoon, getFourPillars, getHiddenStems, getJeonggi, getRelation, getSpecialSals, getStemRelation, getTwelveMeteor, getTwelveSpirit, toHangul } from './pillars.js';
5
- export { BRANCH_ELEMENT, DI_ZHI, EARTH, EARTH_KR, ELEMENT_HANJA, HGANJI, JIJANGGAN, LUCKY_STAR_NAMES, MAIN_STAR_NAMES, METEORS_12, METEOR_LOOKUP, PALACE_NAMES, PILLAR_NAMES, RELATIONS, SHA_STAR_NAMES, SKY, SKY_KR, SPIRITS_12, STEM_INFO, TIAN_GAN, YANGGAN } from './constants.js';
3
+ export { ASPECT_SYMBOLS, HOUSE_SYSTEMS, PLANET_KO, PLANET_SYMBOLS, ROMAN, ZODIAC_KO, ZODIAC_SIGNS, ZODIAC_SYMBOLS, calculateNatal, formatDegree, isKoreanDaylightTime, lonToSign, normalizeDeg } from './natal.js';
4
+ export { analyzeAllRelations, analyzePillarRelations, calcPillarIndices, calcSolarTerms, calculateInjongbeop, calculateJwabeop, checkDirectionalCompose, checkTripleCompose, findTransits, getBranchRelation, getDaewoon, getFourPillars, getGongmang, getHiddenStems, getJeonggi, getRelation, getSpecialSals, getStemRelation, getTwelveMeteor, getTwelveSpirit, getYearGanzi, toHangul } from './pillars.js';
5
+ export { BRANCH_ELEMENT, DI_ZHI, EARTH, EARTH_KR, ELEMENT_HANJA, GONGMANG_TABLE, HGANJI, JIJANGGAN, LUCKY_STAR_NAMES, MAIN_STAR_NAMES, METEORS_12, METEOR_LOOKUP, PALACE_NAMES, PILLAR_NAMES, RELATIONS, SHA_STAR_NAMES, SKY, SKY_KR, SPIRITS_12, STEM_INFO, TIAN_GAN, YANGGAN } from './constants.js';
6
6
  export { City, KOREAN_CITIES, SEOUL, WORLD_CITIES, filterCities, formatCityName } from './cities.js';
7
- export { AllRelations, AspectType, BirthInput, DaewoonItem, Element, Gender, LiuNianInfo, LiuYueInfo, Meteor, NatalAngles, NatalAspect, NatalChart, NatalHouse, PairRelation, Pillar, PillarDetail, PlanetId, PlanetPosition, Relation, RelationResult, SajuResult, SpecialSals, Spirit, StemInfo, TransitItem, WuXingJu, YinYang, ZiweiChart, ZiweiPalace, ZiweiStar, ZodiacSign } from './types.js';
8
- import 'swisseph-wasm';
7
+ export { AllRelations, AspectType, BirthInput, DaewoonItem, Element, Gender, Gongmang, InjongEntry, JasiMethod, JwaEntry, LiuNianInfo, LiuYueInfo, Meteor, NatalAngles, NatalAspect, NatalChart, NatalHouse, PairRelation, Pillar, PillarDetail, PlanetId, PlanetPosition, Relation, RelationResult, SajuResult, SpecialSals, Spirit, StemInfo, TransitItem, WuXingJu, YinYang, ZiweiChart, ZiweiPalace, ZiweiStar, ZodiacSign } from './types.js';
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  calculateSaju
3
- } from "./chunk-TRSIZZ73.js";
3
+ } from "./chunk-6PLRETU5.js";
4
4
  import {
5
5
  calculateLiunian,
6
6
  createChart,
7
7
  getDaxianList
8
- } from "./chunk-KD6TCTRW.js";
8
+ } from "./chunk-APL4STY7.js";
9
9
  import {
10
10
  ASPECT_SYMBOLS,
11
11
  HOUSE_SYSTEMS,
@@ -17,21 +17,26 @@ import {
17
17
  ZODIAC_SYMBOLS,
18
18
  calculateNatal,
19
19
  formatDegree,
20
- getSwissEph,
21
20
  lonToSign,
22
21
  normalizeDeg
23
- } from "./chunk-6PJQHSY6.js";
22
+ } from "./chunk-NSFWX6RO.js";
23
+ import {
24
+ isKoreanDaylightTime
25
+ } from "./chunk-TW4ADZCX.js";
24
26
  import {
25
27
  analyzeAllRelations,
26
28
  analyzePillarRelations,
27
29
  calcPillarIndices,
28
30
  calcSolarTerms,
31
+ calculateInjongbeop,
32
+ calculateJwabeop,
29
33
  checkDirectionalCompose,
30
34
  checkTripleCompose,
31
35
  findTransits,
32
36
  getBranchRelation,
33
37
  getDaewoon,
34
38
  getFourPillars,
39
+ getGongmang,
35
40
  getHiddenStems,
36
41
  getJeonggi,
37
42
  getRelation,
@@ -39,14 +44,16 @@ import {
39
44
  getStemRelation,
40
45
  getTwelveMeteor,
41
46
  getTwelveSpirit,
47
+ getYearGanzi,
42
48
  toHangul
43
- } from "./chunk-DGSIRAXF.js";
49
+ } from "./chunk-JLKMDX3R.js";
44
50
  import {
45
51
  BRANCH_ELEMENT,
46
52
  DI_ZHI,
47
53
  EARTH,
48
54
  EARTH_KR,
49
55
  ELEMENT_HANJA,
56
+ GONGMANG_TABLE,
50
57
  HGANJI,
51
58
  JIJANGGAN,
52
59
  LUCKY_STAR_NAMES,
@@ -63,14 +70,14 @@ import {
63
70
  STEM_INFO,
64
71
  TIAN_GAN,
65
72
  YANGGAN
66
- } from "./chunk-VJDUZB5T.js";
73
+ } from "./chunk-EXYPMSUR.js";
67
74
  import {
68
75
  KOREAN_CITIES,
69
76
  SEOUL,
70
77
  WORLD_CITIES,
71
78
  filterCities,
72
79
  formatCityName
73
- } from "./chunk-OCPJGMZC.js";
80
+ } from "./chunk-WOQT7EBV.js";
74
81
  import "./chunk-JSBRDJBE.js";
75
82
  export {
76
83
  ASPECT_SYMBOLS,
@@ -79,6 +86,7 @@ export {
79
86
  EARTH,
80
87
  EARTH_KR,
81
88
  ELEMENT_HANJA,
89
+ GONGMANG_TABLE,
82
90
  HGANJI,
83
91
  HOUSE_SYSTEMS,
84
92
  JIJANGGAN,
@@ -109,6 +117,8 @@ export {
109
117
  analyzePillarRelations,
110
118
  calcPillarIndices,
111
119
  calcSolarTerms,
120
+ calculateInjongbeop,
121
+ calculateJwabeop,
112
122
  calculateLiunian,
113
123
  calculateNatal,
114
124
  calculateSaju,
@@ -123,14 +133,16 @@ export {
123
133
  getDaewoon,
124
134
  getDaxianList,
125
135
  getFourPillars,
136
+ getGongmang,
126
137
  getHiddenStems,
127
138
  getJeonggi,
128
139
  getRelation,
129
140
  getSpecialSals,
130
141
  getStemRelation,
131
- getSwissEph,
132
142
  getTwelveMeteor,
133
143
  getTwelveSpirit,
144
+ getYearGanzi,
145
+ isKoreanDaylightTime,
134
146
  lonToSign,
135
147
  normalizeDeg,
136
148
  toHangul
package/dist/natal.d.ts CHANGED
@@ -1,11 +1,19 @@
1
- import SwissEph from 'swisseph-wasm';
2
1
  import { AspectType, PlanetId, ZodiacSign, BirthInput, NatalChart } from './types.js';
3
2
 
3
+ /**
4
+ * 한국 하계표준시(KDT) 유틸리티
5
+ *
6
+ * 1987~1988년 88올림픽 준비를 위해 시행된 하계표준시(UTC+10) 보정.
7
+ * SwissEph 등 무거운 의존성 없이 saju/ziwei/natal 모두에서 사용 가능.
8
+ */
9
+ /** 한국 하계표준시(KDT) 기간인지 판정 (1987~1988 88올림픽) */
10
+ declare function isKoreanDaylightTime(year: number, month: number, day: number): boolean;
11
+
4
12
  /**
5
13
  * 서양 점성술 Natal Chart 계산 엔진
6
14
  *
7
- * flatlib/pyswisseph 기반을 TypeScript 포팅.
8
- * 브라우저에서 Swiss Ephemeris를 사용하기 위해 swisseph-wasm을 활용한다.
15
+ * Pure TypeScript ephemeris (Moshier 이론 기반).
16
+ * 외부 데이터 파일이나 WASM 없이 브라우저에서 동기 실행 가능.
9
17
  */
10
18
 
11
19
  declare const ZODIAC_SIGNS: ZodiacSign[];
@@ -17,7 +25,6 @@ declare const ASPECT_SYMBOLS: Record<AspectType, string>;
17
25
  declare const ROMAN: string[];
18
26
  /** 하우스 시스템: [swisseph char, 표시 이름] */
19
27
  declare const HOUSE_SYSTEMS: [string, string][];
20
- declare function getSwissEph(): Promise<SwissEph>;
21
28
  /** longitude → ZodiacSign */
22
29
  declare function lonToSign(lon: number): ZodiacSign;
23
30
  /** 0~360 정규화 (음수 모듈로 처리) */
@@ -26,4 +33,4 @@ declare function normalizeDeg(deg: number): number;
26
33
  declare function formatDegree(lon: number): string;
27
34
  declare function calculateNatal(input: BirthInput, houseSystem?: string): Promise<NatalChart>;
28
35
 
29
- export { ASPECT_SYMBOLS, HOUSE_SYSTEMS, PLANET_KO, PLANET_SYMBOLS, ROMAN, ZODIAC_KO, ZODIAC_SIGNS, ZODIAC_SYMBOLS, calculateNatal, formatDegree, getSwissEph, lonToSign, normalizeDeg };
36
+ export { ASPECT_SYMBOLS, HOUSE_SYSTEMS, PLANET_KO, PLANET_SYMBOLS, ROMAN, ZODIAC_KO, ZODIAC_SIGNS, ZODIAC_SYMBOLS, calculateNatal, formatDegree, isKoreanDaylightTime, lonToSign, normalizeDeg };
package/dist/natal.js CHANGED
@@ -9,10 +9,12 @@ import {
9
9
  ZODIAC_SYMBOLS,
10
10
  calculateNatal,
11
11
  formatDegree,
12
- getSwissEph,
13
12
  lonToSign,
14
13
  normalizeDeg
15
- } from "./chunk-6PJQHSY6.js";
14
+ } from "./chunk-NSFWX6RO.js";
15
+ import {
16
+ isKoreanDaylightTime
17
+ } from "./chunk-TW4ADZCX.js";
16
18
  import "./chunk-JSBRDJBE.js";
17
19
  export {
18
20
  ASPECT_SYMBOLS,
@@ -25,7 +27,7 @@ export {
25
27
  ZODIAC_SYMBOLS,
26
28
  calculateNatal,
27
29
  formatDegree,
28
- getSwissEph,
30
+ isKoreanDaylightTime,
29
31
  lonToSign,
30
32
  normalizeDeg
31
33
  };
package/dist/pillars.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { AllRelations, PairRelation, RelationResult, TransitItem, Relation, SpecialSals } from './types.js';
1
+ import { AllRelations, PairRelation, JasiMethod, InjongEntry, JwaEntry, RelationResult, TransitItem, Relation, SpecialSals } from './types.js';
2
2
 
3
3
  /**
4
4
  * 그레고리력 → 60갑자 인덱스 [연주, 월주, 일주, 시주]
5
5
  *
6
6
  * @returns [so24(60년 배수), so24year, so24month, so24day, so24hour]
7
7
  */
8
- declare function calcPillarIndices(year: number, month: number, day: number, hour: number, min: number): [number, number, number, number, number];
8
+ declare function calcPillarIndices(year: number, month: number, day: number, hour: number, min: number, jasiMethod?: JasiMethod): [number, number, number, number, number];
9
9
  /**
10
10
  * 절기 시간 구하기 - 입기, 중기, 출기 날짜/시각
11
11
  */
@@ -30,9 +30,9 @@ declare function calcSolarTerms(year: number, month: number, day: number, hour:
30
30
  outgiMin: number;
31
31
  };
32
32
  /** 4주를 60갑자 문자열로 반환 [년주, 월주, 일주, 시주] */
33
- declare function getFourPillars(year: number, month: number, day: number, hour: number, minute: number): [string, string, string, string];
33
+ declare function getFourPillars(year: number, month: number, day: number, hour: number, minute: number, jasiMethod?: JasiMethod): [string, string, string, string];
34
34
  /** 대운 10개 계산 */
35
- declare function getDaewoon(isMale: boolean, year: number, month: number, day: number, hour: number, minute: number): Array<{
35
+ declare function getDaewoon(isMale: boolean, year: number, month: number, day: number, hour: number, minute: number, jasiMethod?: JasiMethod): Array<{
36
36
  ganzi: string;
37
37
  startDate: Date;
38
38
  }>;
@@ -48,6 +48,10 @@ declare function toHangul(hanja: string): string;
48
48
  declare function getTwelveMeteor(stem: string, branch: string): string;
49
49
  /** 12신살 계산 (년지 기준) */
50
50
  declare function getTwelveSpirit(yearBranch: string, targetBranch: string): string;
51
+ /** 좌법 계산: 각 주 지장간 → 일지에서의 운성 */
52
+ declare function calculateJwabeop(dayStem: string, branches: string[], dayBranch: string): JwaEntry[][];
53
+ /** 인종법 계산: 일지 지장간에 없는 십성 카테고리의 양간 인종 */
54
+ declare function calculateInjongbeop(dayStem: string, dayBranch: string): InjongEntry[];
51
55
  /** 천간 관계 */
52
56
  declare function getStemRelation(stem1: string, stem2: string): RelationResult[];
53
57
  /** 지지 관계 */
@@ -60,8 +64,12 @@ declare function checkTripleCompose(branches: string[]): RelationResult[];
60
64
  declare function checkDirectionalCompose(branches: string[]): RelationResult[];
61
65
  /** 모든 주 관계 분석 */
62
66
  declare function analyzeAllRelations(pillars: string[]): AllRelations;
63
- declare function getSpecialSals(dayStem: string, dayPillar: string, branches: string[]): SpecialSals;
67
+ declare function getSpecialSals(stems: string[], branches: string[], dayPillar: string): SpecialSals;
68
+ /** 연도 → 년주 간지 (60갑자 주기) */
69
+ declare function getYearGanzi(year: number): string;
70
+ /** 일주(간지) 기준 공망 지지 2개 반환 */
71
+ declare function getGongmang(dayGanzi: string): [string, string];
64
72
  /** N개월간의 일운/월운과 사주의 관계를 찾음 */
65
73
  declare function findTransits(natalPillars: string[], months?: number, backward?: boolean): TransitItem[];
66
74
 
67
- export { analyzeAllRelations, analyzePillarRelations, calcPillarIndices, calcSolarTerms, checkDirectionalCompose, checkTripleCompose, findTransits, getBranchRelation, getDaewoon, getFourPillars, getHiddenStems, getJeonggi, getRelation, getSpecialSals, getStemRelation, getTwelveMeteor, getTwelveSpirit, toHangul };
75
+ export { analyzeAllRelations, analyzePillarRelations, calcPillarIndices, calcSolarTerms, calculateInjongbeop, calculateJwabeop, checkDirectionalCompose, checkTripleCompose, findTransits, getBranchRelation, getDaewoon, getFourPillars, getGongmang, getHiddenStems, getJeonggi, getRelation, getSpecialSals, getStemRelation, getTwelveMeteor, getTwelveSpirit, getYearGanzi, toHangul };
package/dist/pillars.js CHANGED
@@ -3,12 +3,15 @@ import {
3
3
  analyzePillarRelations,
4
4
  calcPillarIndices,
5
5
  calcSolarTerms,
6
+ calculateInjongbeop,
7
+ calculateJwabeop,
6
8
  checkDirectionalCompose,
7
9
  checkTripleCompose,
8
10
  findTransits,
9
11
  getBranchRelation,
10
12
  getDaewoon,
11
13
  getFourPillars,
14
+ getGongmang,
12
15
  getHiddenStems,
13
16
  getJeonggi,
14
17
  getRelation,
@@ -16,21 +19,25 @@ import {
16
19
  getStemRelation,
17
20
  getTwelveMeteor,
18
21
  getTwelveSpirit,
22
+ getYearGanzi,
19
23
  toHangul
20
- } from "./chunk-DGSIRAXF.js";
21
- import "./chunk-VJDUZB5T.js";
24
+ } from "./chunk-JLKMDX3R.js";
25
+ import "./chunk-EXYPMSUR.js";
22
26
  import "./chunk-JSBRDJBE.js";
23
27
  export {
24
28
  analyzeAllRelations,
25
29
  analyzePillarRelations,
26
30
  calcPillarIndices,
27
31
  calcSolarTerms,
32
+ calculateInjongbeop,
33
+ calculateJwabeop,
28
34
  checkDirectionalCompose,
29
35
  checkTripleCompose,
30
36
  findTransits,
31
37
  getBranchRelation,
32
38
  getDaewoon,
33
39
  getFourPillars,
40
+ getGongmang,
34
41
  getHiddenStems,
35
42
  getJeonggi,
36
43
  getRelation,
@@ -38,5 +45,6 @@ export {
38
45
  getStemRelation,
39
46
  getTwelveMeteor,
40
47
  getTwelveSpirit,
48
+ getYearGanzi,
41
49
  toHangul
42
50
  };
package/dist/saju.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  calculateSaju
3
- } from "./chunk-TRSIZZ73.js";
4
- import "./chunk-DGSIRAXF.js";
5
- import "./chunk-VJDUZB5T.js";
3
+ } from "./chunk-6PLRETU5.js";
4
+ import "./chunk-TW4ADZCX.js";
5
+ import "./chunk-JLKMDX3R.js";
6
+ import "./chunk-EXYPMSUR.js";
6
7
  import "./chunk-JSBRDJBE.js";
7
8
  export {
8
9
  calculateSaju