@cyberskill/cyber-editor 3.8.7 → 3.8.8

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 (66) hide show
  1. package/README.md +3 -231
  2. package/dist/client/_commonjsHelpers-C6fGbg64.js +6 -0
  3. package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  4. package/dist/client/assets/manifest-e1ae6e39.js +1 -0
  5. package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +6257 -0
  6. package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +56 -0
  7. package/dist/client/cyber-editor.cjs.js +259 -0
  8. package/dist/client/cyber-editor.cjs2.js +1 -0
  9. package/dist/client/cyber-editor.cjs3.js +1 -0
  10. package/dist/client/cyber-editor.cjs4.js +604 -0
  11. package/dist/client/cyber-editor.cjs5.js +1 -0
  12. package/dist/client/cyber-editor.css +1 -0
  13. package/dist/client/cyber-editor.es.js +25364 -0
  14. package/dist/client/cyber-editor.es2.js +55 -0
  15. package/dist/client/cyber-editor.es3.js +11 -0
  16. package/dist/{cyber-editor.es.js → client/cyber-editor.es4.js} +13995 -15985
  17. package/dist/client/cyber-editor.es5.js +11 -0
  18. package/dist/client/index-HJNgKdvE.cjs +5 -0
  19. package/dist/client/index-rkLJDvut.js +156 -0
  20. package/dist/client/index.html +6 -0
  21. package/dist/client/with-props-Ba4118z_.js +27 -0
  22. package/dist/client/with-props-CuGIah2q.cjs +1 -0
  23. package/package.json +85 -71
  24. package/dist/cyber-editor.cjs.js +0 -638
  25. package/dist/cyber-editor.css +0 -1
  26. package/dist/index.d.ts +0 -3
  27. package/dist/modules/accordion/accordion-extension.d.ts +0 -2
  28. package/dist/modules/accordion/accordion-extension.type.d.ts +0 -11
  29. package/dist/modules/accordion/accordion-view.component.d.ts +0 -2
  30. package/dist/modules/accordion/accordion-view.type.d.ts +0 -5
  31. package/dist/modules/accordion/index.d.ts +0 -4
  32. package/dist/modules/color-picker/color-picker.component.d.ts +0 -2
  33. package/dist/modules/color-picker/color-picker.type.d.ts +0 -4
  34. package/dist/modules/color-picker/index.d.ts +0 -2
  35. package/dist/modules/heading/heading.component.d.ts +0 -2
  36. package/dist/modules/heading/heading.type.d.ts +0 -4
  37. package/dist/modules/heading/index.d.ts +0 -2
  38. package/dist/modules/image/image-view.component.d.ts +0 -2
  39. package/dist/modules/image/image-view.type.d.ts +0 -4
  40. package/dist/modules/image/image.d.ts +0 -2
  41. package/dist/modules/image/image.type.d.ts +0 -12
  42. package/dist/modules/image/index.d.ts +0 -4
  43. package/dist/modules/index.d.ts +0 -6
  44. package/dist/modules/table/index.d.ts +0 -2
  45. package/dist/modules/table/table.component.d.ts +0 -2
  46. package/dist/modules/table/table.type.d.ts +0 -6
  47. package/dist/modules/toolbar/custom.d.ts +0 -1
  48. package/dist/modules/toolbar/index.d.ts +0 -1
  49. package/dist/root.d.ts +0 -1
  50. package/dist/shared/components/color-picker/color-picker.component.d.ts +0 -2
  51. package/dist/shared/components/color-picker/color-picker.type.d.ts +0 -5
  52. package/dist/shared/components/color-picker/index.d.ts +0 -2
  53. package/dist/shared/components/index.d.ts +0 -2
  54. package/dist/shared/components/modal-edit/index.d.ts +0 -2
  55. package/dist/shared/components/modal-edit/modal-edit.component.d.ts +0 -2
  56. package/dist/shared/components/modal-edit/modal-edit.type.d.ts +0 -6
  57. package/dist/shared/configs/env.d.ts +0 -2
  58. package/dist/shared/constants/alias.d.ts +0 -4
  59. package/dist/shared/constants/index.d.ts +0 -1
  60. package/dist/shared/providers/editor.d.ts +0 -3
  61. package/dist/shared/providers/index.d.ts +0 -1
  62. package/dist/shared/typescript/index.d.ts +0 -8
  63. package/dist/shared/utils/extensions.d.ts +0 -1
  64. package/dist/shared/utils/index.d.ts +0 -1
  65. /package/dist/{assets → client/assets}/icons/index.ts +0 -0
  66. /package/dist/{favicon.svg → client/favicon.svg} +0 -0
package/README.md CHANGED
@@ -1,233 +1,5 @@
1
1
  # Hướng Dẫn Sử Dụng Dự Án
2
2
 
3
- <!-- Mục lục -->
4
-
5
- - [Yêu Cầu](#yêu-cầu)
6
- - [Cài Đặt](#cài-đặt)
7
- - [Chạy Dự Án](#chạy-dự-án)
8
- - [Chạy ở môi trường development với Docker](#chạy-ở-môi-trường-development-với-docker)
9
- - [Chạy ở môi trường development (Local)](#chạy-ở-môi-trường-development-local)
10
- - [Các Script & Ý Nghĩa](#các-script--ý-nghĩa)
11
- - [Quy Ước Viết Code & Đặt Tên](#quy-ước-viết-code--đặt-tên)
12
- - [Quy Ước Đặt Tên](#quy-ước-đặt-tên)
13
- - [Quy Ước Đặt Tên Chung](#quy-ước-đặt-tên-chung)
14
- - [Quy Ước Tiền Tố Trong TypeScript](#quy-ước-tiền-tố-trong-typescript)
15
- - [Quy Ước Đặt Tên Type Trong GraphQL](#quy-ước-đặt-tên-type-trong-graphql)
16
- - [Quy Ước Đặt Tên Biến Môi Trường](#quy-ước-đặt-tên-biến-môi-trường)
17
- - [Quy Ước Khi Import](#quy-ước-khi-import)
18
- - [Quy Ước Viết Code](#quy-ước-viết-code)
19
- - [Quy Ước Đặt Commit Message](#quy-ước-đặt-commit-message)
20
- - [Cấu Trúc Thư Mục Và Ý Nghĩa](#cấu-trúc-thư-mục-và-ý-nghĩa)
21
- - [Quy Trình Làm Việc Với Git](#quy-trình-làm-việc-với-git)
22
-
23
- ---
24
-
25
- ## Yêu Cầu
26
-
27
- - **nvm (Node Version Manager):**
28
- - MacOS: [nvm-sh/nvm](https://github.com/nvm-sh/nvm)
29
- - Windows: [coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows)
30
- - **Node.js:** 22.14.0
31
- _(nvm sẽ tự động cài đặt phiên bản này nếu chưa có)_
32
- - MacOS: [node-v22.14.0.pkg](https://nodejs.org/dist/v22.14.0/node-v22.14.0.pkg)
33
- - Windows: [node-v22.14.0-x64.msi](https://nodejs.org/dist/v22.14.0/node-v22.14.0-x64.msi)
34
- - **Docker:** [Docker Desktop](https://www.docker.com/products/docker-desktop)
35
- - **Ghi chú:** Dùng **pnpm** để tránh xung đột với các công cụ khác.
36
-
37
- ---
38
-
39
- ## Cài Đặt
40
-
41
- 1. **Tạo file cấu hình môi trường:**
42
- Sao chép file `.env.example` thành `.env`.
43
- 2. **Chỉnh sửa file `.env`:**
44
- Cập nhật các trường cần thiết phù hợp với môi trường máy.
45
-
46
- ---
47
-
48
- ## Chạy Dự Án
49
-
50
- ### Chạy ở môi trường development với Docker
51
-
52
- _(Lưu ý: Hãy bật Docker trước khi chạy)_
53
-
54
- ```bash
55
- make build-development
56
- make start-development
57
- ```
58
-
59
- ### Chạy ở môi trường development (Local)
60
-
61
- ```bash
62
- pnpm i -f
63
- pnpm run dev
64
- ```
65
-
66
- ---
67
-
68
- ## Các Script & Ý Nghĩa
69
-
70
- Kiểm tra lỗi lint:
71
-
72
- | Script | Ý nghĩa |
73
- | ---------------- | --------------------------------------- |
74
- | **lint** | kiểm tra lỗi lint và typescript |
75
- | **lint:fix** | tự động sửa các lỗi có thể sửa |
76
- | **lint:inspect** | xem chi tiết các lint rule đang dùng |
77
- | **reset** | cài đặt lại dependencies |
78
- | **setup** | nâng cấp dependencies |
79
- | **inspect** | xem chi tiết các dependencies đang dùng |
80
-
81
- ---
82
-
83
- ## Quy Ước Viết Code & Đặt Tên
84
-
85
- ### Quy Ước Đặt Tên
86
-
87
- | Loại | Quy Ước | Ví Dụ |
88
- | ---------------------- | ------------ | ------------------- |
89
- | **Tên biến** | `camelCase` | `userName` |
90
- | **Tên hàm** | `camelCase` | `getUserInfo()` |
91
- | **Tên biến parameter** | `camelCase` | `id, userData` |
92
- | **Tên biến argument** | `camelCase` | `fetchData(userId)` |
93
- | **Tên biến private** | `_camelCase` | `_isHidden` |
94
- | **Tên class** | `PascalCase` | `UserProfile` |
95
- | **Tên hằng số** | `UPPER_CASE` | `MAX_RETRY_COUNT` |
96
- | **Tên file** | `kebab-case` | `user-service.ts` |
97
- | **Tên thư mục** | `kebab-case` | `services/` |
98
-
99
- ### Quy Ước Đặt Tên Chung
100
-
101
- | Loại | Tiền Tố | Quy Tắc | Ví Dụ |
102
- | ------------------------ | ------------- | ----------------------------- | --------------------------- |
103
- | **Biến đại diện input** | `I_Input_` | Tiền tố + loại + kiểu dữ liệu | `interface I_Input_User` |
104
- | **Biến đại diện output** | `I_Response_` | Tiền tố + loại + kiểu dữ liệu | `interface I_Response_User` |
105
-
106
- ### Quy Ước Tiền Tố Trong TypeScript
107
-
108
- | Loại | Tiền Tố | Ví Dụ |
109
- | ------------- | ------- | ------------------ |
110
- | **Interface** | `I_` | `interface I_User` |
111
- | **Type** | `T_` | `type T_User` |
112
- | **Enum** | `E_` | `enum E_User` |
113
-
114
- ### Quy Ước Đặt Tên Type Trong GraphQL
115
-
116
- | Loại | Tiền Tố | Ví Dụ |
117
- | --------- | ------- | -------------------- |
118
- | **Type** | `T_` | `type T_User` |
119
- | **Input** | `I_` | `input I_CreateUser` |
120
-
121
- ### Quy Ước Đặt Tên Biến Môi Trường
122
-
123
- | Loại | Tiền Tố | Ví Dụ |
124
- | ----------- | -------------- | --------------------- |
125
- | **React** | `REACT_APP_` | `REACT_APP_API_URL` |
126
- | **Next.js** | `NEXT_PUBLIC_` | `NEXT_PUBLIC_API_KEY` |
127
- | **Vite** | `VITE_` | `VITE_API_SECRET` |
128
- | **Node.js** | `NODE_` | `NODE_ENV` |
129
-
130
- ### Quy Ước Khi Import
131
-
132
- 1. Các thư viện bên ngoài **ở trên cùng**.
133
- 2. Các module/hàm tiện ích **ở dưới**, cách một dòng trắng với phần trên.
134
- 3. Định cấu hình đường dẫn để **import nhanh** trong `tsconfig.json`.
135
-
136
- ```ts
137
- import React from 'react'; // Thư viện bên ngoài
138
-
139
- import { formatDate } from '#shared/utils'; // Module nội bộ
140
- ```
141
-
142
- ### Quy Ước Viết Code
143
-
144
- ✅ **Làm**
145
-
146
- - Dùng `let` và `const` thay vì `var`.
147
- - Dùng `===` thay vì `==`.
148
- - Xóa `console.log`, `alert` và `debugger` trước khi commit.
149
-
150
- ❌ **Không làm**
151
-
152
- - Không dùng `any`, `unknown`, `never`.
153
- - Không dùng `@ts-ignore`, `@ts-nocheck`.
154
-
155
- ### Quy Ước Đặt Commit Message
156
-
157
- | Loại Commit | Cú Pháp | Ví Dụ |
158
- | ----------------- | ----------------------- | ------------------------------------------ |
159
- | **Tính năng mới** | `feat(module): message` | `feat(user): add user login` |
160
- | **Sửa lỗi** | `fix(module): message` | `fix(auth): incorrect password validation` |
161
-
162
- ## Cấu trúc thư mục và ý nghĩa
163
-
164
- ```text
165
- │── .github/ # Cấu hình GitHub Actions hoặc tài liệu liên quan đến GitHub
166
- │── dist/ # Thư mục build sau khi chạy `vite build`
167
- │── node_modules/ # Thư viện và dependency của Node.js
168
- │── src/ # Thư mục chứa mã nguồn chính
169
- │ ├── modules/ # Các module chính trong ứng dụng
170
- │ │ ├── [module-name]/ # Tên module
171
- │ │ │ ├── module.scss # Styles cho module
172
- │ │ │ ├── module.component.tsx # Component của module
173
- │ │ │ ├── module.type.tsx # Typescript của module
174
- │ │ │ ├── index.tsx # Export các file ngang cấp
175
- │ ├── shared/ # Các tài nguyên dùng chung
176
- │ │ ├── assets/
177
- │ │ │ ├── styles/ # CSS dùng trong dự án
178
- │ │ ├── components/ # Các component dùng chung giữa nhiều trang
179
- │ │ ├── configs/ # Các file cấu hình
180
- │ │ │ ├── env.ts # Cấu hình biến môi trường
181
- │ │ ├── constants/ # Các hằng số dùng trong dự án
182
- │ │ ├── providers/ # Providers chung của ứng dụng
183
- │ │ ├── typescript/ # Kiểu dữ liệu TypeScript dùng trong dự án
184
- │ ├── index.tsx # File đầu vào của dự án
185
- │ ├── root.tsx # File khởi tạo React App
186
- │ ├── vite-env.d.ts # Cấu hình typescript cho Vite
187
- │── .env # File environment variables (bí mật, không commit lên Git)
188
- │── .env.example # Mẫu `.env` để tham khảo
189
- │── .gitignore # Danh sách các file cần bỏ qua khi commit
190
- │── .ncurc.cjs # Cấu hình kiểm tra cập nhật package
191
- │── .nvmrc # Cấu hình Node.js version manager
192
- │── .simple-git-hooks.json # Cấu hình simple git hooks
193
- │── eslint.config.js # Cấu hình ESLint
194
- │── index.html # file html chính của dự án
195
- │── package.json # Danh sách dependencies và scripts của dự án
196
- │── pnpm-lock.yaml # File lock dependencies của pnpm
197
- │── README.md # Tài liệu mô tả dự án
198
- │── tsconfig.app.json # Cấu hình TypeScript cho ứng dụng
199
- │── tsconfig.json # Cấu hình TypeScript chung
200
- │── tsconfig.node.json # Cấu hình TypeScript cho Node.js
201
- │── vite.config.ts # Cấu hình Vite
202
- ```
203
-
204
- ## Quy Trình Làm Việc Với Git
205
-
206
- 1. **Tạo nhánh mới từ `develop`**:
207
-
208
- ```bash
209
- git checkout develop
210
- git pull origin develop
211
- git checkout -b feature/new-feature
212
- ```
213
-
214
- 2. **Commit theo chuẩn**:
215
-
216
- ```bash
217
- git commit -m "feat(module): mô tả ngắn gọn"
218
- ```
219
-
220
- 3. **Rebase trước khi merge**:
221
-
222
- ```bash
223
- git checkout develop
224
- git pull origin develop
225
- git checkout feature/new-feature
226
- git rebase develop
227
- ```
228
-
229
- 4. **Tạo Pull Request (PR)** và đợi review trước khi merge vào `develop`.
230
-
231
- ---
232
-
233
- > **Ghi chú:** Nếu có bất kỳ thắc mắc nào, vui lòng liên hệ team phát triển!
3
+ <a href="node_modules/@cyberskill/shared/public/wiki/convention.md">
4
+ Đọc tại đây
5
+ </a>
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as g
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}exports.getDefaultExportFromCjs=e;
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/cyber-editor.cjs.js","imports":["/chunk-D4RADZKF-sLhgGPy5.cjs","/_commonjsHelpers-DwGv2jUC.cjs"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs2.js","imports":["/chunk-D4RADZKF-sLhgGPy5.cjs","/_commonjsHelpers-DwGv2jUC.cjs","/with-props-CuGIah2q.cjs","/index-HJNgKdvE.cjs"],"css":[]},"shared/layout/blank/index":{"id":"shared/layout/blank/index","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs3.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs"],"css":[]},"pages/home/index":{"id":"pages/home/index","parentId":"shared/layout/blank/index","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs4.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs","/index-HJNgKdvE.cjs","/_commonjsHelpers-DwGv2jUC.cjs"],"css":[]},"pages/error/404":{"id":"pages/error/404","parentId":"root","path":"*?","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs5.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs"],"css":[]}},"url":"/assets/manifest-e1ae6e39.js","version":"e1ae6e39"};