lichta 1.0.0-beta → 1.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.
package/README.md CHANGED
@@ -1,28 +1,32 @@
1
1
  # 🌙 LichTa
2
2
 
3
- **Thư viện chuyển đổi Dương lịch Âm lịch Việt Nam cho JavaScript/TypeScript.**
3
+ **Vietnamese SolarLunar Calendar conversion library for JavaScript/TypeScript.**
4
4
 
5
- Hỗ trợ Svelte 5 components ăn liền, đồng thời export pure TypeScript core cho React, Vue, Angular, vanilla JS.
5
+ Supports ready-to-use Svelte 5 components, while exporting a pure TypeScript core for React, Vue, Angular, and vanilla JS.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/lichta)](https://www.npmjs.com/package/lichta)
8
- [![license](https://img.shields.io/npm/l/lichta)](https://github.com/juststridev/lichta/blob/main/LICENSE)
8
+ [![license](https://img.shields.io/npm/l/lichta)](https://github.com/zeforc/lichta/blob/main/LICENSE)
9
+
10
+ 🚀 **[Live Demo](https://lich-ta.vercel.app/)**
11
+
12
+ > 🇻🇳 [Phiên bản Tiếng Việt (Vietnamese version)](./README.vi.md)
9
13
 
10
14
  ---
11
15
 
12
- ## ✨ Tính năng
16
+ ## ✨ Features
13
17
 
14
- - 🔄 **Chuyển đổi Solar ↔ Lunar** — Thuật toán Hồ Ngọc Đức (phạm vi 1800–2199)
15
- - 🐉 **Can Chi** — Tính Can Chi cho năm, tháng, ngày, giờ
16
- - 🔮 **Ngũ Hành & Mệnh** — Tính mệnh theo năm sinh
17
- - ⏰ **Giờ Hoàng Đạo** — 6 giờ tốt trong ngày
18
- - 📅 **Calendar Component** — Lịch tháng Svelte 5 với ngày âm lịch
19
- - 🎨 **Format** — Hiển thị ngày âm lịch truyền thống (Mùng Một tháng Giêng...)
20
- - 🌐 **i18n** — Hỗ trợ ViệtAnhNhậtHàn (vi, en, ja, ko)
18
+ - 🔄 **Solar ↔ Lunar Conversion** — Ho Ngoc Duc algorithm (range 1800–2199)
19
+ - 🐉 **Sexagenary Cycle (Can Chi)** — Calculate Can Chi for year, month, day, and hour
20
+ - 🔮 **Five Elements (Ngũ Hành)** — Calculate destiny element based on birth year
21
+ - ⏰ **Auspicious Hours (Giờ Hoàng Đạo)** — 6 auspicious hours in a day
22
+ - 📅 **Calendar Component** — Svelte 5 monthly calendar with lunar dates
23
+ - 🎨 **Format** — Display traditional lunar dates (Mùng Một tháng Giêng...)
24
+ - 🌐 **i18n** — VietnameseEnglishJapaneseKorean support (vi, en, ja, ko)
21
25
  - 📦 **Multi-framework** — Svelte 5, React, Vue, Angular, vanilla JS
22
26
 
23
27
  ---
24
28
 
25
- ## 📦 Cài đặt
29
+ ## 📦 Installation
26
30
 
27
31
  ```bash
28
32
  npm install lichta
@@ -30,16 +34,16 @@ npm install lichta
30
34
 
31
35
  ---
32
36
 
33
- ## 🚀 Sử dụng
37
+ ## 🚀 Usage
34
38
 
35
- ### Core Logic (mọi framework)
39
+ ### Core Logic (Any framework)
36
40
 
37
- Import từ `lichta/core` để sử dụng **pure TypeScript** — không phụ thuộc Svelte:
41
+ Import from `lichta/core` to use **pure TypeScript** — no Svelte dependency:
38
42
 
39
43
  ```typescript
40
44
  import { LichTa, getYearDetails } from 'lichta/core';
41
45
 
42
- // Dương lịch Âm lịch
46
+ // SolarLunar
43
47
  const lunar = LichTa.toLunar(10, 2, 2024);
44
48
  // → {
45
49
  // day: 1, month: 1, year: 2024,
@@ -50,122 +54,124 @@ const lunar = LichTa.toLunar(10, 2, 2024);
50
54
  // jd: 2460350
51
55
  // }
52
56
 
53
- // Âm lịch Dương lịch
57
+ // LunarSolar
54
58
  const solar = LichTa.toSolar(1, 1, 2024, false);
55
59
  // → { day: 10, month: 2, year: 2024 }
56
60
 
57
- // Múi giờ tùy chỉnh (mặc định GMT+7)
61
+ // Custom timezone (default is GMT+7)
58
62
  const lunarChina = LichTa.toLunar(10, 2, 2024, 8); // GMT+8
59
63
  ```
60
64
 
61
- ### Can Chi & Phong Thủy
65
+ ### Sexagenary Cycle & Feng Shui (Can Chi & Phong Thủy)
62
66
 
63
67
  ```typescript
64
- import { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours } from 'lichta/core';
65
-
66
- // Can Chi + Mệnh theo năm
68
+ import {
69
+ getYearDetails,
70
+ getDayCanChi,
71
+ getMonthCanChi,
72
+ getHourCanChi,
73
+ getAuspiciousHours
74
+ } from 'lichta/core';
75
+
76
+ // Can Chi + Element for the year
67
77
  getYearDetails(2024);
68
78
  // → { can: 'Giáp', chi: 'Thìn', menh: 'Hỏa',
69
79
  // fullString: 'Giáp Thìn - Mệnh Hỏa' }
70
80
 
71
- // Can Chi ngày (cần Julian Day Number)
81
+ // Day Can Chi (requires Julian Day Number)
72
82
  const lunar = LichTa.toLunar(10, 2, 2024);
73
- getDayCanChi(lunar.jd); // → 'Giáp Tý'
83
+ getDayCanChi(lunar.jd); // → 'Giáp Tý'
74
84
 
75
- // Can Chi tháng
76
- getMonthCanChi(1, 2024); // → tháng Giêng năm Giáp Thìn
85
+ // Month Can Chi
86
+ getMonthCanChi(1, 2024); // → month Giêng year Giáp Thìn
77
87
 
78
- // Can Chi giờ
79
- getHourCanChi(8, lunar.jd); // → giờ Thìn (7h-9h)
88
+ // Hour Can Chi
89
+ getHourCanChi(8, lunar.jd); // → hour Thìn (7h-9h)
80
90
 
81
- // Giờ Hoàng Đạo
91
+ // Auspicious Hours
82
92
  getAuspiciousHours(lunar.jd);
83
93
  // → ['Tý', 'Sửu', 'Mão', 'Ngọ', 'Mùi', 'Dậu']
84
94
  ```
85
95
 
86
- ### Format & Hiển thị
96
+ ### Format & Display
87
97
 
88
98
  ```typescript
89
99
  import { formatTraditional, formatLunarDate, getMonthName, getDayName } from 'lichta/utils';
90
100
 
91
101
  const lunar = LichTa.toLunar(10, 2, 2024);
92
102
 
93
- // Format truyền thống
103
+ // Traditional format
94
104
  formatTraditional(lunar);
95
105
  // → 'Mùng Một tháng Giêng năm Giáp Thìn'
96
106
 
97
- // Format theo pattern
98
- formatLunarDate(lunar, 'dd/MM/yyyy'); // → '01/01/2024'
99
- formatLunarDate(lunar, 'CC'); // → 'Giáp Thìn'
100
- formatLunarDate(lunar, 'Ngày DC'); // → 'Ngày Giáp Tý'
107
+ // Pattern format
108
+ formatLunarDate(lunar, 'dd/MM/yyyy'); // → '01/01/2024'
109
+ formatLunarDate(lunar, 'CC'); // → 'Giáp Thìn'
110
+ formatLunarDate(lunar, 'Ngày DC'); // → 'Ngày Giáp Tý'
101
111
 
102
- // Tên truyền thống
103
- getMonthName(1); // → 'Giêng'
112
+ // Traditional names
113
+ getMonthName(1); // → 'Giêng'
104
114
  getMonthName(12); // → 'Chạp'
105
- getDayName(1); // → 'Mùng Một'
106
- getDayName(15); // → 'Rằm'
107
- getDayName(30); // → 'Ba Mươi'
115
+ getDayName(1); // → 'Mùng Một'
116
+ getDayName(15); // → 'Rằm'
117
+ getDayName(30); // → 'Ba Mươi'
108
118
  ```
109
119
 
110
120
  **Format tokens:**
111
121
 
112
- | Token | Mô tả | Ví dụ |
113
- |--------|-------------------------------|--------------|
114
- | `dd` | Ngày 2 chữ số | 01, 15 |
115
- | `d` | Ngày | 1, 15 |
116
- | `MM` | Tháng 2 chữ số | 01, 12 |
117
- | `M` | Tháng | 1, 12 |
118
- | `yyyy` | Năm 4 chữ số | 2024 |
119
- | `yy` | Năm 2 chữ số cuối | 24 |
120
- | `CC` | Can Chi năm | Giáp Thìn |
121
- | `DC` | Can Chi ngày | Giáp Tý |
122
- | `MC` | Can Chi tháng | Bính Dần |
123
- | `L` | "Nhuận" nếu tháng nhuận | Nhuận |
122
+ | Token | Description | Example |
123
+ | ------ | --------------------- | --------- |
124
+ | `dd` | 2-digit day | 01, 15 |
125
+ | `d` | Day | 1, 15 |
126
+ | `MM` | 2-digit month | 01, 12 |
127
+ | `M` | Month | 1, 12 |
128
+ | `yyyy` | 4-digit year | 2024 |
129
+ | `yy` | Last 2 digits of year | 24 |
130
+ | `CC` | Year Can Chi | Giáp Thìn |
131
+ | `DC` | Day Can Chi | Giáp Tý |
132
+ | `MC` | Month Can Chi | Bính Dần |
133
+ | `L` | "Nhuận" if leap month | Nhuận |
124
134
 
125
135
  ### Svelte 5 Components
126
136
 
127
137
  ```svelte
128
138
  <script>
129
- import { Calendar, Formatter } from 'lichta';
139
+ import { Calendar, Formatter } from 'lichta';
130
140
  </script>
131
141
 
132
- <!-- Lịch tháng đầy đủ -->
133
- <Calendar
134
- showLunar={true}
135
- locale="vi"
136
- onSelect={(date, lunar) => console.log(date, lunar)}
137
- />
142
+ <!-- Full monthly calendar -->
143
+ <Calendar showLunar={true} locale="vi" onSelect={(date, lunar) => console.log(date, lunar)} />
138
144
 
139
- <!-- Hiển thị ngày âm lịch -->
145
+ <!-- Lunar date formatter -->
140
146
  <Formatter date={new Date()} />
141
147
  ```
142
148
 
143
149
  #### Calendar Props
144
150
 
145
- | Prop | Type | Mặc định | Mô tả |
146
- |----------------|-----------------------------------------------|-------------------|-------------------------------|
147
- | `month` | `number` | Tháng hiện tại | Tháng hiển thị (1-12) |
148
- | `year` | `number` | Năm hiện tại | Năm hiển thị |
149
- | `selectedDate` | `Date \| null` | `null` | Ngày được chọn |
150
- | `onSelect` | `(date: Date, lunar: LunarDate) => void` | — | Callback khi chọn ngày |
151
- | `showLunar` | `boolean` | `true` | Hiển thị ngày âm lịch |
152
- | `locale` | `'vi' \| 'en' \| 'ja' \| 'ko'` | `'vi'` | Ngôn ngữ |
153
- | `dayCell` | `Snippet` | — | Custom snippet cho ô ngày |
151
+ | Prop | Type | Default | Description |
152
+ | -------------- | ---------------------------------------- | ------------- | --------------------------- |
153
+ | `month` | `number` | Current month | Displayed month (1-12) |
154
+ | `year` | `number` | Current year | Displayed year |
155
+ | `selectedDate` | `Date \| null` | `null` | Selected date |
156
+ | `onSelect` | `(date: Date, lunar: LunarDate) => void` | — | Callback on date select |
157
+ | `showLunar` | `boolean` | `true` | Show lunar dates |
158
+ | `locale` | `'vi' \| 'en' \| 'ja' \| 'ko'` | `'vi'` | Language |
159
+ | `dayCell` | `Snippet` | — | Custom snippet for day cell |
154
160
 
155
161
  #### Theming
156
162
 
157
- Calendar hỗ trợ CSS custom properties:
163
+ The Calendar supports CSS custom properties:
158
164
 
159
165
  ```css
160
166
  :root {
161
- --lichta-primary: #d4a373;
162
- --lichta-bg: #fffcf7;
163
- --lichta-text: #2c1810;
164
- --lichta-today-bg: #d4a373;
165
- --lichta-selected-bg: #a0522d;
166
- --lichta-lunar-text: #b08968;
167
- --lichta-radius: 8px;
168
- --lichta-font: 'Inter', sans-serif;
167
+ --lichta-primary: #d4a373;
168
+ --lichta-bg: #fffcf7;
169
+ --lichta-text: #2c1810;
170
+ --lichta-today-bg: #d4a373;
171
+ --lichta-selected-bg: #a0522d;
172
+ --lichta-lunar-text: #b08968;
173
+ --lichta-radius: 8px;
174
+ --lichta-font: 'Inter', sans-serif;
169
175
  }
170
176
  ```
171
177
 
@@ -174,24 +180,24 @@ Calendar hỗ trợ CSS custom properties:
174
180
  ```typescript
175
181
  import { t, getZodiacAnimal } from 'lichta';
176
182
 
177
- // Lấy bộ dịch
183
+ // Get dictionary
178
184
  const vi = t('vi');
179
- vi.heavenlyStems; // ['Giáp', 'Ất', ...]
185
+ vi.heavenlyStems; // ['Giáp', 'Ất', ...]
180
186
  vi.earthlyBranches; // ['Tý', 'Sửu', ...]
181
- vi.fiveElements; // ['Kim', 'Mộc', 'Thủy', 'Hỏa', 'Thổ']
182
- vi.monthNames; // ['Giêng', 'Hai', ..., 'Chạp']
187
+ vi.fiveElements; // ['Kim', 'Mộc', 'Thủy', 'Hỏa', 'Thổ']
188
+ vi.monthNames; // ['Giêng', 'Hai', ..., 'Chạp']
183
189
 
184
190
  const en = t('en');
185
- en.fiveElements; // ['Metal', 'Wood', 'Water', 'Fire', 'Earth']
186
- en.zodiacAnimals; // ['Rat', 'Ox', 'Tiger', ...]
191
+ en.fiveElements; // ['Metal', 'Wood', 'Water', 'Fire', 'Earth']
192
+ en.zodiacAnimals; // ['Rat', 'Ox', 'Tiger', ...]
187
193
 
188
194
  const ja = t('ja');
189
- ja.weekDays; // ['日', '月', '火', '水', '木', '金', '土']
195
+ ja.weekDays; // ['日', '月', '火', '水', '木', '金', '土']
190
196
 
191
197
  const ko = t('ko');
192
- ko.fiveElements; // ['금', '목', '수', '화', '토']
198
+ ko.fiveElements; // ['금', '목', '수', '화', '토']
193
199
 
194
- // Con giáp theo năm
200
+ // Zodiac animal by year
195
201
  getZodiacAnimal(0, 'vi'); // → 'Chuột'
196
202
  getZodiacAnimal(4, 'en'); // → 'Dragon'
197
203
  getZodiacAnimal(0, 'ja'); // → '鼠'
@@ -201,35 +207,35 @@ getZodiacAnimal(0, 'ja'); // → '鼠'
201
207
 
202
208
  ## 📁 Import Paths
203
209
 
204
- | Path | Nội dung | Dùng cho |
205
- |-----------------|-----------------------------------|-------------------------------|
206
- | `lichta` | Toàn bộ API + Svelte components | Svelte 5 projects |
207
- | `lichta/core` | Pure TypeScript logic | React, Vue, Angular, vanilla |
208
- | `lichta/utils` | Format utilities | Mọi framework |
210
+ | Path | Content | Used for |
211
+ | -------------- | ---------------------------- | ---------------------------- |
212
+ | `lichta` | Full API + Svelte components | Svelte 5 projects |
213
+ | `lichta/core` | Pure TypeScript logic | React, Vue, Angular, vanilla |
214
+ | `lichta/utils` | Format utilities | Any framework |
209
215
 
210
216
  ```typescript
211
- // Svelte 5 — import tất cả
217
+ // Svelte 5 — import everything
212
218
  import { LichTa, Calendar, Formatter, formatTraditional } from 'lichta';
213
219
 
214
- // React / Vue / Angular — chỉ import core logic
220
+ // React / Vue / Angular — import core logic only
215
221
  import { LichTa, getYearDetails } from 'lichta/core';
216
222
  import { formatTraditional, getDayName } from 'lichta/utils';
217
223
  ```
218
224
 
219
225
  ---
220
226
 
221
- ## 📐 Thuật toán
227
+ ## 📐 Algorithm
222
228
 
223
- LichTa sử dụng thuật toán chuyển đổi âm lịch của **Hồ Ngọc Đức** (Đại học Leipzig), dựa trên:
229
+ LichTa uses the lunar conversion algorithm by **Ho Ngoc Duc** (Leipzig University), based on:
224
230
 
225
- - **Julian Day Number** — Hệ tọa độ ngày liên tục cho tính toán thiên văn
226
- - **Điểm Sóc (New Moon)** — Xác định mùng 1 âm lịch
227
- - **Trung Khí (Solar Terms)** — Xác định tháng tháng nhuận
228
- - **Jean Meeus, "Astronomical Algorithms"** — Công thức thiên văn chính xác
231
+ - **Julian Day Number** — Continuous day coordinate system for astronomical calculations
232
+ - **New Moon** — Determines the 1st day of the lunar month
233
+ - **Solar Terms** — Determines months and leap months
234
+ - **Jean Meeus, "Astronomical Algorithms"** — Precise astronomical formulas
229
235
 
230
- **Phạm vi**: 1800 – 2199 | **Múi giờ mặc định**: GMT+7 (Việt Nam)
236
+ **Range**: 1800 – 2199 | **Default timezone**: GMT+7 (Vietnam)
231
237
 
232
- Xem chi tiết trong [docs/ALGORITHM.md](./docs/ALGORITHM.md).
238
+ See details in [docs/ALGORITHM.md](./docs/ALGORITHM.md).
233
239
 
234
240
  ---
235
241
 
@@ -241,5 +247,5 @@ Xem chi tiết trong [docs/ALGORITHM.md](./docs/ALGORITHM.md).
241
247
 
242
248
  ## 🙏 Credits
243
249
 
244
- - **Hồ Ngọc Đức** — Thuật toán gốc ([informatik.uni-leipzig.de](http://www.informatik.uni-leipzig.de/~duc/amlich/))
245
- - **Jean Meeus** — *Astronomical Algorithms* (1998)
250
+ - **Ho Ngoc Duc** — Original algorithm ([informatik.uni-leipzig.de](http://www.informatik.uni-leipzig.de/~duc/amlich/))
251
+ - **Jean Meeus** — _Astronomical Algorithms_ (1998)
@@ -1,57 +1,57 @@
1
1
  <script lang="ts">
2
- import { LichTa } from '../core/lunar.js';
3
- import type { LunarDate } from '../core/types.js';
4
- import type { Snippet } from 'svelte';
2
+ import { LichTa } from '../core/lunar.js';
3
+ import type { LunarDate } from '../core/types.js';
4
+ import type { Snippet } from 'svelte';
5
5
 
6
- // Props nhận vào từ consumer ứng dụng
7
- interface Props {
8
- date?: Date;
9
- children?: Snippet;
10
- }
11
- let { date = new Date(), children }: Props = $props();
6
+ // Props nhận vào từ consumer ứng dụng
7
+ interface Props {
8
+ date?: Date;
9
+ children?: Snippet;
10
+ }
11
+ let { date = new Date(), children }: Props = $props();
12
12
 
13
- // Khai báo biến reactive tự động tính toán lại khi `date` thay đổi
14
- let lunar: LunarDate = $derived.by(() => {
15
- const d = date.getDate();
16
- const m = date.getMonth() + 1; // Tháng trong JS tính từ 0
17
- const y = date.getFullYear();
18
- return LichTa.toLunar(d, m, y);
19
- });
13
+ // Khai báo biến reactive tự động tính toán lại khi `date` thay đổi
14
+ let lunar: LunarDate = $derived.by(() => {
15
+ const d = date.getDate();
16
+ const m = date.getMonth() + 1; // Tháng trong JS tính từ 0
17
+ const y = date.getFullYear();
18
+ return LichTa.toLunar(d, m, y);
19
+ });
20
20
  </script>
21
21
 
22
22
  <div class="lich-ta-formatter">
23
- <div class="lunar-display-banner">
24
- <span class="lunar-date">Ngày {lunar.day} tháng {lunar.month} (Âm lịch)</span>
25
- <span class="can-chi-details">Năm {lunar.yearCanChi}</span>
26
- </div>
23
+ <div class="lunar-display-banner">
24
+ <span class="lunar-date">Ngày {lunar.day} tháng {lunar.month} (Âm lịch)</span>
25
+ <span class="can-chi-details">Năm {lunar.yearCanChi}</span>
26
+ </div>
27
27
 
28
- <div class="control-slot-wrapper">
29
- {@render children?.()}
30
- </div>
28
+ <div class="control-slot-wrapper">
29
+ {@render children?.()}
30
+ </div>
31
31
  </div>
32
32
 
33
33
  <style>
34
- .lich-ta-formatter {
35
- display: block;
36
- width: 100%;
37
- box-sizing: border-box;
38
- }
39
- .lunar-display-banner {
40
- padding: 12px;
41
- background-color: #fcfaf7;
42
- border-left: 4px solid #d4a373;
43
- margin-bottom: 16px;
44
- }
45
- .lunar-date {
46
- display: block;
47
- font-weight: bold;
48
- font-size: 1.1rem;
49
- color: #1a1a1a;
50
- }
51
- .can-chi-details {
52
- display: block;
53
- font-size: 0.9rem;
54
- color: #666666;
55
- margin-top: 4px;
56
- }
57
- </style>
34
+ .lich-ta-formatter {
35
+ display: block;
36
+ width: 100%;
37
+ box-sizing: border-box;
38
+ }
39
+ .lunar-display-banner {
40
+ padding: 12px;
41
+ background-color: #fcfaf7;
42
+ border-left: 4px solid #d4a373;
43
+ margin-bottom: 16px;
44
+ }
45
+ .lunar-date {
46
+ display: block;
47
+ font-weight: bold;
48
+ font-size: 1.1rem;
49
+ color: #1a1a1a;
50
+ }
51
+ .can-chi-details {
52
+ display: block;
53
+ font-size: 0.9rem;
54
+ color: #666666;
55
+ margin-top: 4px;
56
+ }
57
+ </style>
@@ -1,3 +1,3 @@
1
1
  export { LichTa, jdFromDate, jdToDate, getNewMoonDay, getSunLongitude } from './lunar.js';
2
- export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours, } from './feng-shui.js';
2
+ export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours } from './feng-shui.js';
3
3
  export type { LunarDate, SolarDate } from './types.js';
@@ -1,4 +1,4 @@
1
1
  // Xuất bản phần lõi TypeScript — KHÔNG có Svelte dependencies
2
2
  // Dành cho React, Vue, Angular, vanilla JS consumers
3
3
  export { LichTa, jdFromDate, jdToDate, getNewMoonDay, getSunLongitude } from './lunar.js';
4
- export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours, } from './feng-shui.js';
4
+ export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours } from './feng-shui.js';
@@ -279,7 +279,7 @@ export class LichTa {
279
279
  jd: dayNumber,
280
280
  dayCanChi,
281
281
  monthCanChi,
282
- yearCanChi,
282
+ yearCanChi
283
283
  };
284
284
  }
285
285
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { LichTa, jdFromDate, jdToDate } from './core/lunar.js';
2
2
  export type { LunarDate, SolarDate } from './core/types.js';
3
- export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours, } from './core/feng-shui.js';
3
+ export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours } from './core/feng-shui.js';
4
4
  export { formatLunarDate, formatTraditional, getMonthName, getDayName } from './utils/format.js';
5
5
  export { t, getZodiacAnimal } from './constants/i18n.js';
6
6
  export type { Locale } from './constants/i18n.js';
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // Xuất bản phần lõi TypeScript (Cho những ai chỉ muốn dùng logic toán học)
5
5
  export { LichTa, jdFromDate, jdToDate } from './core/lunar.js';
6
6
  // Xuất bản phần phong thủy
7
- export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours, } from './core/feng-shui.js';
7
+ export { getYearDetails, getDayCanChi, getMonthCanChi, getHourCanChi, getAuspiciousHours } from './core/feng-shui.js';
8
8
  // Xuất bản phần format/tiện ích
9
9
  export { formatLunarDate, formatTraditional, getMonthName, getDayName } from './utils/format.js';
10
10
  // Xuất bản phần i18n
@@ -3,13 +3,32 @@
3
3
  // ============================================================
4
4
  /** Tên tháng âm lịch truyền thống */
5
5
  const MONTH_NAMES = [
6
- 'Giêng', 'Hai', 'Ba', 'Tư', 'Năm', 'Sáu',
7
- 'Bảy', 'Tám', 'Chín', 'Mười', 'Một', 'Chạp',
6
+ 'Giêng',
7
+ 'Hai',
8
+ 'Ba',
9
+ 'Tư',
10
+ 'Năm',
11
+ 'Sáu',
12
+ 'Bảy',
13
+ 'Tám',
14
+ 'Chín',
15
+ 'Mười',
16
+ 'Một',
17
+ 'Chạp'
8
18
  ];
9
19
  /** Tên số đếm truyền thống */
10
20
  const DAY_UNITS = [
11
- '', 'Một', 'Hai', 'Ba', 'Bốn', 'Năm',
12
- 'Sáu', 'Bảy', 'Tám', 'Chín', 'Mười',
21
+ '',
22
+ 'Một',
23
+ 'Hai',
24
+ 'Ba',
25
+ 'Bốn',
26
+ 'Năm',
27
+ 'Sáu',
28
+ 'Bảy',
29
+ 'Tám',
30
+ 'Chín',
31
+ 'Mười'
13
32
  ];
14
33
  /**
15
34
  * Lấy tên tháng âm lịch dạng chữ truyền thống.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "lichta",
3
- "version": "1.0.0-beta",
3
+ "version": "1.0.1",
4
4
  "description": "Thư viện chuyển đổi Dương lịch ↔ Âm lịch Việt Nam. Vietnamese lunar calendar conversion library with Svelte 5 components.",
5
- "author": "Stridev | Gavin (Thien) N",
5
+ "author": "Zeforc | Stridev",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "dev": "vite dev",
@@ -58,13 +58,24 @@
58
58
  "@sveltejs/package": "^2.5.8",
59
59
  "@sveltejs/vite-plugin-svelte": "^7.1.2",
60
60
  "@types/node": "^22",
61
+ "@event-calendar/core": "^5.7.1",
62
+ "@event-calendar/day-grid": "^3.12.0",
63
+ "@fullcalendar/core": "^6.1.20",
64
+ "@fullcalendar/daygrid": "^6.1.20",
65
+ "moment": "^2.30.1",
61
66
  "eslint": "^10.4.1",
62
67
  "eslint-config-prettier": "^10.1.8",
63
68
  "eslint-plugin-svelte": "^3.19.0",
64
69
  "globals": "^17.6.0",
70
+ "lichta-event-calendar": "^1.0.0",
71
+ "lichta-full-calendar": "^1.0.0",
72
+ "lichta-react-big-calendar": "^1.0.0",
65
73
  "prettier": "^3.8.3",
66
74
  "prettier-plugin-svelte": "^4.1.0",
67
75
  "publint": "^0.3.21",
76
+ "react": "^19.2.7",
77
+ "react-big-calendar": "^1.20.0",
78
+ "react-dom": "^19.2.7",
68
79
  "svelte": "^5.56.1",
69
80
  "svelte-check": "^4.6.0",
70
81
  "typescript": "^6.0.3",
@@ -85,10 +96,10 @@
85
96
  ],
86
97
  "repository": {
87
98
  "type": "git",
88
- "url": "git+https://github.com/juststridev/lichta.git"
99
+ "url": "git+https://github.com/zeforc/lichta.git"
89
100
  },
90
101
  "bugs": {
91
- "url": "https://github.com/juststridev/lichta/issues"
102
+ "url": "https://github.com/zeforc/lichta/issues"
92
103
  },
93
- "homepage": "https://github.com/juststridev/lichta#readme"
104
+ "homepage": "https://github.com/zeforc/lichta#readme"
94
105
  }