lichta 2.1.0 → 2.2.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,7 +1,7 @@
1
1
  # lichta (legacy)
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/lichta.svg)](https://www.npmjs.com/package/lichta)
4
- [![npm version](https://img.shields.io/npm/v/@lichta/core.svg)](https://www.npmjs.com/package/@lichta/core)
3
+ [![lichta](https://img.shields.io/npm/v/lichta.svg?label=lichta)](https://www.npmjs.com/package/lichta)
4
+ [![@lichta/core](https://img.shields.io/npm/v/@lichta/core.svg?label=%40lichta%2Fcore)](https://www.npmjs.com/package/@lichta/core)
5
5
 
6
6
  🚀 **[Demo trực tiếp](https://lichta.zeneo.app/)**
7
7
 
@@ -11,19 +11,20 @@
11
11
 
12
12
  Trước đây toàn bộ thư viện được publish dưới 1 package tên `lichta` duy nhất. Từ khi tách thành monorepo với các package scoped (`@lichta/core`, `@lichta/react`, `@lichta/vue`, `@lichta/svelte`, `@lichta/full-calendar`, `@lichta/event-calendar`, `@lichta/react-big-calendar`), package `lichta` được giữ lại làm cầu nối tương thích ngược cho những dự án đang cài `lichta` từ trước, tránh vỡ code đột ngột khi họ chạy `npm update`.
13
13
 
14
- ## Trạng thái hiện tại
14
+ ## Trạng thái hiện tại (từ v2.2.0)
15
15
 
16
- **Package này hiện chỉ re-export `@lichta/svelte`:**
16
+ **Package này giờ chỉ re-export `@lichta/core`** (vanilla JS/TS, không phụ thuộc framework nào):
17
17
 
18
18
  ```javascript
19
19
  // index.js
20
- console.warn("[lichta] WARNING: The 'lichta' package is deprecated for Svelte components. ...");
21
- export * from '@lichta/svelte';
20
+ export * from '@lichta/core';
22
21
  ```
23
22
 
24
23
  Nghĩa là:
25
- - Nếu bạn đang dùng Svelte, `import { ... } from 'lichta'` vẫn hoạt động (thực chất là `@lichta/svelte`), nhưng sẽ in cảnh báo deprecation ra console.
26
- - Nếu bạn dùng React, Vue, hoặc chỉ cần logic tính toán thuần (vanilla JS/TS) — package này **không có đường dẫn tương thích cho bạn**, chỉ trỏ tới `@lichta/svelte`. Cài `lichta` trong trường hợp này sẽ kéo theo `svelte` như một dependency dù bạn không dùng Svelte.
24
+ - `import { LichTa } from 'lichta'` hoạt động tương đương `import { LichTa } from '@lichta/core'` không kéo theo `react`/`vue`/`svelte` như một dependency bạn không dùng.
25
+ - Nếu bạn cần component UI (Calendar/DatePicker) cho React, Vue, hoặc Svelte — package này **không có đường dẫn tương thích cho bạn**, cài thẳng package framework tương ứng bên dưới.
26
+
27
+ > ⚠️ **Breaking change so với các bản trước v2.2.0**: trước đây `lichta` re-export `@lichta/svelte` (kèm cảnh báo deprecation). Nếu bạn đang dùng `import { Calendar } from 'lichta'` để lấy Svelte component, migrate sang `@lichta/svelte`.
27
28
 
28
29
  ## Nên làm gì
29
30
 
@@ -39,7 +40,7 @@ Nghĩa là:
39
40
  | EventCalendar | [`@lichta/event-calendar`](https://www.npmjs.com/package/@lichta/event-calendar) |
40
41
  | React Big Calendar | [`@lichta/react-big-calendar`](https://www.npmjs.com/package/@lichta/react-big-calendar) |
41
42
 
42
- Nếu bạn đang cài `lichta` từ trước và dùng API core (`LichTa.toLunar()`, ...), chuyển sang `@lichta/core` API không đổi, chỉ đổi tên import:
43
+ Nếu bạn đang cài `lichta` từ trước và dùng API core (`LichTa.toLunar()`, ...), không cần đổi gì — `lichta` giờ chính `@lichta/core`. Khuyến nghị đổi tên import cho rõ ràng:
43
44
 
44
45
  ```diff
45
46
  - import { LichTa } from 'lichta';
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from '@lichta/svelte';
1
+ export * from '@lichta/core';
package/index.js CHANGED
@@ -1,3 +1 @@
1
- console.warn("[lichta] WARNING: The 'lichta' package is deprecated for Svelte components. It will become a pure Vanilla JS core in v3.0.0. Please migrate to '@lichta/svelte' if you are using Svelte.");
2
-
3
- export * from '@lichta/svelte';
1
+ export * from '@lichta/core';
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "lichta",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "LichTa - Thư viện lịch Âm Dương Việt Nam (Tương thích ngược)",
5
5
  "author": "Zeforc Labs | Stridev",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
- "svelte": "./index.js",
9
8
  "types": "./index.d.ts",
10
9
  "exports": {
11
10
  ".": {
12
11
  "types": "./index.d.ts",
13
- "svelte": "./index.js",
14
12
  "default": "./index.js"
15
13
  }
16
14
  },
@@ -20,7 +18,7 @@
20
18
  "LICENSE"
21
19
  ],
22
20
  "dependencies": {
23
- "@lichta/svelte": "2.1.0"
21
+ "@lichta/core": "2.2.1"
24
22
  },
25
23
  "repository": {
26
24
  "type": "git",