@toantranmei/editor 0.1.2 → 0.3.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.
- package/README.md +109 -5
- package/dist/block-names-QblT9TgF.js +30 -0
- package/dist/block-names-QblT9TgF.js.map +1 -0
- package/dist/collaboration.js +42 -0
- package/dist/collaboration.js.map +1 -0
- package/dist/{css-BSGpc2It.js → css-el97DJfy.js} +201 -41
- package/dist/css-el97DJfy.js.map +1 -0
- package/dist/date-utils-DW99lT2W.js +1308 -0
- package/dist/date-utils-DW99lT2W.js.map +1 -0
- package/dist/index.js +2467 -2848
- package/dist/index.js.map +1 -1
- package/dist/nuxt.js +9 -8
- package/dist/nuxt.js.map +1 -1
- package/dist/render.js +445 -0
- package/dist/render.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/collaboration.d.ts +27 -0
- package/dist/types/components/MeiEditor.vue.d.ts +17 -3
- package/dist/types/components/MermaidDiagram.vue.d.ts +8 -5
- package/dist/types/composables/usePointerMoved.d.ts +10 -0
- package/dist/types/config.d.ts +3 -0
- package/dist/types/date-utils.d.ts +2 -2
- package/dist/types/define-block.d.ts +27 -1
- package/dist/types/extensions/code-block.d.ts +10 -0
- package/dist/types/extensions/code-languages.d.ts +2 -0
- package/dist/types/extensions/embed-url.d.ts +2 -0
- package/dist/types/extensions/embed.d.ts +2 -2
- package/dist/types/extensions/html-block.d.ts +2 -26
- package/dist/types/extensions/html-document.d.ts +26 -0
- package/dist/types/extensions/index.d.ts +6 -1
- package/dist/types/extensions/markdown-paste.d.ts +36 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/locale.d.ts +2 -0
- package/dist/types/render/highlight.d.ts +4 -0
- package/dist/types/render/html.d.ts +14 -0
- package/dist/types/render/icons.d.ts +2 -0
- package/dist/types/render/index.d.ts +51 -0
- package/dist/types/render/mermaid.d.ts +13 -0
- package/dist/types/render/nodes.d.ts +17 -0
- package/dist/types/render/types.d.ts +102 -0
- package/dist/types/safe-url.d.ts +19 -0
- package/dist/types/theme/tokens.d.ts +202 -0
- package/package.json +23 -7
- package/dist/css-BSGpc2It.js.map +0 -1
|
@@ -0,0 +1,1308 @@
|
|
|
1
|
+
// src/locale.ts
|
|
2
|
+
var e = {
|
|
3
|
+
placeholder: "Gõ '/' để chọn loại block...",
|
|
4
|
+
headingPlaceholder: (e) => `Tiêu đề ${e}`,
|
|
5
|
+
togglePlaceholder: "Toggle",
|
|
6
|
+
groups: {
|
|
7
|
+
basic: "Cơ bản",
|
|
8
|
+
media: "Media",
|
|
9
|
+
advanced: "Nâng cao",
|
|
10
|
+
layout: "Bố cục"
|
|
11
|
+
},
|
|
12
|
+
blocks: {
|
|
13
|
+
paragraph: {
|
|
14
|
+
title: "Văn bản",
|
|
15
|
+
description: "Đoạn văn bản thường."
|
|
16
|
+
},
|
|
17
|
+
heading1: {
|
|
18
|
+
title: "Tiêu đề 1",
|
|
19
|
+
description: "Tiêu đề lớn."
|
|
20
|
+
},
|
|
21
|
+
heading2: {
|
|
22
|
+
title: "Tiêu đề 2",
|
|
23
|
+
description: "Tiêu đề vừa."
|
|
24
|
+
},
|
|
25
|
+
heading3: {
|
|
26
|
+
title: "Tiêu đề 3",
|
|
27
|
+
description: "Tiêu đề nhỏ."
|
|
28
|
+
},
|
|
29
|
+
heading4: {
|
|
30
|
+
title: "Tiêu đề 4",
|
|
31
|
+
description: "Tiêu đề rất nhỏ."
|
|
32
|
+
},
|
|
33
|
+
toggleHeading1: {
|
|
34
|
+
title: "Toggle tiêu đề 1",
|
|
35
|
+
description: "Tiêu đề lớn có thể thu gọn."
|
|
36
|
+
},
|
|
37
|
+
toggleHeading2: {
|
|
38
|
+
title: "Toggle tiêu đề 2",
|
|
39
|
+
description: "Tiêu đề vừa có thể thu gọn."
|
|
40
|
+
},
|
|
41
|
+
toggleHeading3: {
|
|
42
|
+
title: "Toggle tiêu đề 3",
|
|
43
|
+
description: "Tiêu đề nhỏ có thể thu gọn."
|
|
44
|
+
},
|
|
45
|
+
toc: {
|
|
46
|
+
title: "Mục lục",
|
|
47
|
+
description: "Tự tạo từ các tiêu đề."
|
|
48
|
+
},
|
|
49
|
+
mathBlock: {
|
|
50
|
+
title: "Công thức",
|
|
51
|
+
description: "Công thức toán (LaTeX)."
|
|
52
|
+
},
|
|
53
|
+
mathInline: {
|
|
54
|
+
title: "Công thức trong dòng",
|
|
55
|
+
description: "Công thức nằm trong câu."
|
|
56
|
+
},
|
|
57
|
+
mermaid: {
|
|
58
|
+
title: "Sơ đồ Mermaid",
|
|
59
|
+
description: "Flowchart, sequence, gantt..."
|
|
60
|
+
},
|
|
61
|
+
html: {
|
|
62
|
+
title: "HTML",
|
|
63
|
+
description: "Chạy HTML/CSS/JS tương tác trong trang."
|
|
64
|
+
},
|
|
65
|
+
"file-file": {
|
|
66
|
+
title: "Tệp đính kèm",
|
|
67
|
+
description: "Tải lên hoặc dán link tệp."
|
|
68
|
+
},
|
|
69
|
+
"file-audio": {
|
|
70
|
+
title: "Âm thanh",
|
|
71
|
+
description: "Tải lên hoặc dán link audio."
|
|
72
|
+
},
|
|
73
|
+
"file-video": {
|
|
74
|
+
title: "Video tải lên",
|
|
75
|
+
description: "Tải lên hoặc dán link video."
|
|
76
|
+
},
|
|
77
|
+
mention: {
|
|
78
|
+
title: "Nhắc tên / ngày",
|
|
79
|
+
description: "Nhắc người, trang hoặc ngày."
|
|
80
|
+
},
|
|
81
|
+
bulletList: {
|
|
82
|
+
title: "Danh sách chấm",
|
|
83
|
+
description: "Danh sách gạch đầu dòng."
|
|
84
|
+
},
|
|
85
|
+
orderedList: {
|
|
86
|
+
title: "Danh sách số",
|
|
87
|
+
description: "Danh sách đánh số thứ tự."
|
|
88
|
+
},
|
|
89
|
+
taskList: {
|
|
90
|
+
title: "Việc cần làm",
|
|
91
|
+
description: "Danh sách checkbox."
|
|
92
|
+
},
|
|
93
|
+
blockquote: {
|
|
94
|
+
title: "Trích dẫn",
|
|
95
|
+
description: "Đoạn trích dẫn."
|
|
96
|
+
},
|
|
97
|
+
divider: {
|
|
98
|
+
title: "Đường kẻ",
|
|
99
|
+
description: "Phân cách các phần."
|
|
100
|
+
},
|
|
101
|
+
codeBlock: {
|
|
102
|
+
title: "Code",
|
|
103
|
+
description: "Đoạn code có tô màu cú pháp."
|
|
104
|
+
},
|
|
105
|
+
image: {
|
|
106
|
+
title: "Hình ảnh",
|
|
107
|
+
description: "Tải ảnh lên hoặc dán link."
|
|
108
|
+
},
|
|
109
|
+
embed: {
|
|
110
|
+
title: "Video / Embed",
|
|
111
|
+
description: "Nhúng YouTube, Vimeo, web..."
|
|
112
|
+
},
|
|
113
|
+
callout: {
|
|
114
|
+
title: "Callout",
|
|
115
|
+
description: "Khối nổi bật có icon."
|
|
116
|
+
},
|
|
117
|
+
toggle: {
|
|
118
|
+
title: "Toggle",
|
|
119
|
+
description: "Khối có thể thu gọn / mở rộng."
|
|
120
|
+
},
|
|
121
|
+
table: {
|
|
122
|
+
title: "Bảng",
|
|
123
|
+
description: "Bảng 3×3 đơn giản."
|
|
124
|
+
},
|
|
125
|
+
columns2: {
|
|
126
|
+
title: "2 cột",
|
|
127
|
+
description: "Chia nội dung thành 2 cột."
|
|
128
|
+
},
|
|
129
|
+
columns3: {
|
|
130
|
+
title: "3 cột",
|
|
131
|
+
description: "Chia nội dung thành 3 cột."
|
|
132
|
+
},
|
|
133
|
+
columns4: {
|
|
134
|
+
title: "4 cột",
|
|
135
|
+
description: "Chia nội dung thành 4 cột."
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
slash: {
|
|
139
|
+
empty: "Không tìm thấy block nào",
|
|
140
|
+
results: "Kết quả",
|
|
141
|
+
recent: "Dùng gần đây",
|
|
142
|
+
colors: "Màu",
|
|
143
|
+
textColor: (e) => `Chữ ${e.toLowerCase()}`,
|
|
144
|
+
bgColor: (e) => `Nền ${e.toLowerCase()}`
|
|
145
|
+
},
|
|
146
|
+
handle: {
|
|
147
|
+
add: "để thêm block bên dưới",
|
|
148
|
+
addAbove: "để thêm bên trên",
|
|
149
|
+
drag: "để di chuyển",
|
|
150
|
+
menu: "để mở menu",
|
|
151
|
+
dragVerb: "Kéo",
|
|
152
|
+
clickVerb: "Bấm",
|
|
153
|
+
altClickVerb: "Alt+bấm"
|
|
154
|
+
},
|
|
155
|
+
blockMenu: {
|
|
156
|
+
delete: "Xoá",
|
|
157
|
+
duplicate: "Nhân bản",
|
|
158
|
+
turnInto: "Chuyển thành",
|
|
159
|
+
color: "Màu",
|
|
160
|
+
textColor: "Màu chữ",
|
|
161
|
+
backgroundColor: "Màu nền",
|
|
162
|
+
recent: "Dùng gần đây",
|
|
163
|
+
search: "Tìm thao tác...",
|
|
164
|
+
noResults: "Không có kết quả",
|
|
165
|
+
moveUp: "Di chuyển lên",
|
|
166
|
+
moveDown: "Di chuyển xuống",
|
|
167
|
+
copyLink: "Sao chép link tới block",
|
|
168
|
+
linkCopied: "Đã sao chép link",
|
|
169
|
+
actions: "Thao tác",
|
|
170
|
+
selected: (e) => `${e} block`
|
|
171
|
+
},
|
|
172
|
+
colors: {
|
|
173
|
+
default: "Mặc định",
|
|
174
|
+
gray: "Xám",
|
|
175
|
+
brown: "Nâu",
|
|
176
|
+
orange: "Cam",
|
|
177
|
+
yellow: "Vàng",
|
|
178
|
+
green: "Xanh lá",
|
|
179
|
+
blue: "Xanh dương",
|
|
180
|
+
purple: "Tím",
|
|
181
|
+
pink: "Hồng",
|
|
182
|
+
red: "Đỏ"
|
|
183
|
+
},
|
|
184
|
+
format: {
|
|
185
|
+
bold: "Đậm",
|
|
186
|
+
italic: "Nghiêng",
|
|
187
|
+
underline: "Gạch chân",
|
|
188
|
+
strike: "Gạch ngang",
|
|
189
|
+
code: "Code",
|
|
190
|
+
link: "Link",
|
|
191
|
+
color: "Màu",
|
|
192
|
+
linkPlaceholder: "Dán link...",
|
|
193
|
+
removeLink: "Bỏ link",
|
|
194
|
+
apply: "OK"
|
|
195
|
+
},
|
|
196
|
+
image: {
|
|
197
|
+
upload: "Tải lên",
|
|
198
|
+
link: "Dán link",
|
|
199
|
+
choose: "Chọn ảnh",
|
|
200
|
+
dropHint: (e) => `Hoặc kéo thả ảnh vào đây · tối đa ${e}MB`,
|
|
201
|
+
insert: "Chèn ảnh",
|
|
202
|
+
notImage: "File không phải ảnh.",
|
|
203
|
+
tooLarge: (e) => `Ảnh tối đa ${e}MB.`,
|
|
204
|
+
invalidLink: "Link ảnh không hợp lệ.",
|
|
205
|
+
caption: "Thêm chú thích...",
|
|
206
|
+
uploading: "Đang tải lên...",
|
|
207
|
+
uploadFailed: "Tải ảnh lên thất bại.",
|
|
208
|
+
align: "Căn lề",
|
|
209
|
+
alignments: {
|
|
210
|
+
left: "Căn trái",
|
|
211
|
+
center: "Căn giữa",
|
|
212
|
+
right: "Căn phải"
|
|
213
|
+
},
|
|
214
|
+
captionToggle: "Chú thích",
|
|
215
|
+
crop: "Cắt ảnh",
|
|
216
|
+
cropDone: "Xong",
|
|
217
|
+
cropCancel: "Huỷ",
|
|
218
|
+
cropReset: "Đặt lại",
|
|
219
|
+
zoom: "Phóng to",
|
|
220
|
+
zoomIn: "Phóng to",
|
|
221
|
+
zoomOut: "Thu nhỏ",
|
|
222
|
+
zoomReset: "Về 100%",
|
|
223
|
+
download: "Tải xuống",
|
|
224
|
+
more: "Thêm",
|
|
225
|
+
replace: "Thay ảnh",
|
|
226
|
+
copyLink: "Sao chép link ảnh",
|
|
227
|
+
linkCopied: "Đã sao chép",
|
|
228
|
+
original: "Xem ảnh gốc",
|
|
229
|
+
delete: "Xoá",
|
|
230
|
+
close: "Đóng"
|
|
231
|
+
},
|
|
232
|
+
embed: {
|
|
233
|
+
hint: "Nhúng video hoặc trang web (YouTube, Vimeo, Loom, Figma, Google Maps...)",
|
|
234
|
+
placeholder: "Dán link vào đây...",
|
|
235
|
+
submit: "Nhúng",
|
|
236
|
+
invalid: "Link không hợp lệ (cần http/https)."
|
|
237
|
+
},
|
|
238
|
+
callout: {
|
|
239
|
+
change: "Đổi icon / màu",
|
|
240
|
+
icon: "Icon",
|
|
241
|
+
background: "Màu nền"
|
|
242
|
+
},
|
|
243
|
+
code: {
|
|
244
|
+
copy: "Copy",
|
|
245
|
+
copied: "Đã copy"
|
|
246
|
+
},
|
|
247
|
+
unknownBlock: "Block không được hỗ trợ",
|
|
248
|
+
invalidBlock: "Block bị lỗi dữ liệu (đã giữ nguyên)",
|
|
249
|
+
contentError: "Không đọc được nội dung. Editor đang ở chế độ chỉ xem để không ghi đè dữ liệu đã lưu.",
|
|
250
|
+
toc: {
|
|
251
|
+
empty: "Thêm tiêu đề để tạo mục lục.",
|
|
252
|
+
untitled: "Không có tiêu đề",
|
|
253
|
+
title: "Mục lục"
|
|
254
|
+
},
|
|
255
|
+
table: {
|
|
256
|
+
rowMenu: "Bấm để mở menu hàng",
|
|
257
|
+
columnMenu: "Bấm để mở menu cột",
|
|
258
|
+
headerRow: "Hàng tiêu đề",
|
|
259
|
+
headerColumn: "Cột tiêu đề",
|
|
260
|
+
insertAbove: "Chèn hàng phía trên",
|
|
261
|
+
insertBelow: "Chèn hàng phía dưới",
|
|
262
|
+
insertLeft: "Chèn cột bên trái",
|
|
263
|
+
insertRight: "Chèn cột bên phải",
|
|
264
|
+
duplicate: "Nhân bản",
|
|
265
|
+
moveUp: "Di chuyển lên",
|
|
266
|
+
moveDown: "Di chuyển xuống",
|
|
267
|
+
moveLeft: "Di chuyển sang trái",
|
|
268
|
+
moveRight: "Di chuyển sang phải",
|
|
269
|
+
clear: "Xoá nội dung",
|
|
270
|
+
color: "Màu nền",
|
|
271
|
+
deleteRow: "Xoá hàng",
|
|
272
|
+
deleteColumn: "Xoá cột",
|
|
273
|
+
merge: "Gộp ô",
|
|
274
|
+
split: "Tách ô",
|
|
275
|
+
addRow: "Thêm hàng",
|
|
276
|
+
addColumn: "Thêm cột"
|
|
277
|
+
},
|
|
278
|
+
math: {
|
|
279
|
+
placeholder: "Thêm công thức",
|
|
280
|
+
inputPlaceholder: "Nhập LaTeX, ví dụ E = mc^2",
|
|
281
|
+
hintBlock: "⌘ + Enter để xong",
|
|
282
|
+
hintInline: "Enter để xong",
|
|
283
|
+
missing: "Cần cài thư viện \"katex\" để hiển thị công thức."
|
|
284
|
+
},
|
|
285
|
+
mermaid: {
|
|
286
|
+
preview: "Xem trước sơ đồ",
|
|
287
|
+
invalid: "Cú pháp Mermaid chưa đúng.",
|
|
288
|
+
missing: "Cần cài thư viện \"mermaid\" để hiển thị sơ đồ."
|
|
289
|
+
},
|
|
290
|
+
html: {
|
|
291
|
+
title: "HTML",
|
|
292
|
+
code: "Code",
|
|
293
|
+
preview: "Xem trước",
|
|
294
|
+
upload: "Tải lên file .html",
|
|
295
|
+
uploadFile: "Tải lên file",
|
|
296
|
+
write: "Viết code",
|
|
297
|
+
expand: "Phóng to",
|
|
298
|
+
close: "Đóng",
|
|
299
|
+
interact: "Tương tác",
|
|
300
|
+
emptyHint: "Chạy HTML, CSS và JavaScript ngay trong trang (máy tính, quiz, sơ đồ, prototype...).",
|
|
301
|
+
placeholder: "<!-- Viết hoặc dán code HTML vào đây -->",
|
|
302
|
+
wrongType: "Chỉ nhận file .html.",
|
|
303
|
+
tooLarge: (e) => `File tối đa ${e >= 1024 ? `${Math.round(e / 1024)}MB` : `${e}KB`}.`
|
|
304
|
+
},
|
|
305
|
+
file: {
|
|
306
|
+
upload: "Tải lên",
|
|
307
|
+
link: "Dán link",
|
|
308
|
+
embed: "Chèn",
|
|
309
|
+
chooseFile: "Chọn tệp",
|
|
310
|
+
chooseAudio: "Chọn tệp âm thanh",
|
|
311
|
+
chooseVideo: "Chọn video",
|
|
312
|
+
dropHint: (e) => `Hoặc kéo thả vào đây · tối đa ${e}MB`,
|
|
313
|
+
tooLarge: (e) => `Tệp tối đa ${e}MB.`,
|
|
314
|
+
wrongType: "Định dạng tệp không phù hợp.",
|
|
315
|
+
uploadFailed: "Tải lên thất bại.",
|
|
316
|
+
invalidLink: "Link không hợp lệ.",
|
|
317
|
+
uploading: "Đang tải lên...",
|
|
318
|
+
download: "Tải xuống"
|
|
319
|
+
},
|
|
320
|
+
datePicker: {
|
|
321
|
+
endDate: "Ngày kết thúc",
|
|
322
|
+
dateFormat: "Định dạng ngày",
|
|
323
|
+
includeTime: "Bao gồm giờ",
|
|
324
|
+
timeFormat: "Định dạng giờ",
|
|
325
|
+
hour12: "12 giờ",
|
|
326
|
+
hour24: "24 giờ",
|
|
327
|
+
remind: "Nhắc nhở",
|
|
328
|
+
clear: "Xoá",
|
|
329
|
+
learnReminders: "Tìm hiểu về nhắc nhở",
|
|
330
|
+
prevMonth: "Tháng trước",
|
|
331
|
+
nextMonth: "Tháng sau",
|
|
332
|
+
formats: {
|
|
333
|
+
full: "Ngày đầy đủ",
|
|
334
|
+
short: "Ngày rút gọn",
|
|
335
|
+
mdy: "Tháng/Ngày/Năm",
|
|
336
|
+
dmy: "Ngày/Tháng/Năm",
|
|
337
|
+
ymd: "Năm/Tháng/Ngày",
|
|
338
|
+
relative: "Tương đối"
|
|
339
|
+
},
|
|
340
|
+
reminders: {
|
|
341
|
+
none: "Không",
|
|
342
|
+
day: "Trong ngày (9:00)",
|
|
343
|
+
at: "Đúng giờ",
|
|
344
|
+
"5m": "Trước 5 phút",
|
|
345
|
+
"10m": "Trước 10 phút",
|
|
346
|
+
"15m": "Trước 15 phút",
|
|
347
|
+
"30m": "Trước 30 phút",
|
|
348
|
+
"1h": "Trước 1 giờ",
|
|
349
|
+
"2h": "Trước 2 giờ",
|
|
350
|
+
"1d": "Trước 1 ngày",
|
|
351
|
+
"2d": "Trước 2 ngày",
|
|
352
|
+
"1w": "Trước 1 tuần"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
mention: {
|
|
356
|
+
today: "Hôm nay",
|
|
357
|
+
tomorrow: "Ngày mai",
|
|
358
|
+
yesterday: "Hôm qua",
|
|
359
|
+
people: "Người",
|
|
360
|
+
pages: "Trang",
|
|
361
|
+
dates: "Ngày",
|
|
362
|
+
empty: "Không tìm thấy",
|
|
363
|
+
searchPlaceholder: "Tìm người hoặc trang...",
|
|
364
|
+
noSearch: "Chưa cấu hình tìm kiếm (mention.configure({ search }))",
|
|
365
|
+
openPage: "Mở trang",
|
|
366
|
+
prevMonth: "Tháng trước",
|
|
367
|
+
nextMonth: "Tháng sau"
|
|
368
|
+
}
|
|
369
|
+
}, t = {
|
|
370
|
+
placeholder: "Type '/' for commands...",
|
|
371
|
+
headingPlaceholder: (e) => `Heading ${e}`,
|
|
372
|
+
togglePlaceholder: "Toggle",
|
|
373
|
+
groups: {
|
|
374
|
+
basic: "Basic blocks",
|
|
375
|
+
media: "Media",
|
|
376
|
+
advanced: "Advanced",
|
|
377
|
+
layout: "Layout"
|
|
378
|
+
},
|
|
379
|
+
blocks: {
|
|
380
|
+
paragraph: {
|
|
381
|
+
title: "Text",
|
|
382
|
+
description: "Plain text."
|
|
383
|
+
},
|
|
384
|
+
heading1: {
|
|
385
|
+
title: "Heading 1",
|
|
386
|
+
description: "Big section heading."
|
|
387
|
+
},
|
|
388
|
+
heading2: {
|
|
389
|
+
title: "Heading 2",
|
|
390
|
+
description: "Medium section heading."
|
|
391
|
+
},
|
|
392
|
+
heading3: {
|
|
393
|
+
title: "Heading 3",
|
|
394
|
+
description: "Small section heading."
|
|
395
|
+
},
|
|
396
|
+
heading4: {
|
|
397
|
+
title: "Heading 4",
|
|
398
|
+
description: "Smallest heading."
|
|
399
|
+
},
|
|
400
|
+
toggleHeading1: {
|
|
401
|
+
title: "Toggle heading 1",
|
|
402
|
+
description: "Collapsible big heading."
|
|
403
|
+
},
|
|
404
|
+
toggleHeading2: {
|
|
405
|
+
title: "Toggle heading 2",
|
|
406
|
+
description: "Collapsible medium heading."
|
|
407
|
+
},
|
|
408
|
+
toggleHeading3: {
|
|
409
|
+
title: "Toggle heading 3",
|
|
410
|
+
description: "Collapsible small heading."
|
|
411
|
+
},
|
|
412
|
+
toc: {
|
|
413
|
+
title: "Table of contents",
|
|
414
|
+
description: "Built from your headings."
|
|
415
|
+
},
|
|
416
|
+
mathBlock: {
|
|
417
|
+
title: "Block equation",
|
|
418
|
+
description: "Math with LaTeX."
|
|
419
|
+
},
|
|
420
|
+
mathInline: {
|
|
421
|
+
title: "Inline equation",
|
|
422
|
+
description: "Math inside a sentence."
|
|
423
|
+
},
|
|
424
|
+
mermaid: {
|
|
425
|
+
title: "Mermaid diagram",
|
|
426
|
+
description: "Flowchart, sequence, gantt..."
|
|
427
|
+
},
|
|
428
|
+
html: {
|
|
429
|
+
title: "HTML",
|
|
430
|
+
description: "Interactive HTML/CSS/JS on the page."
|
|
431
|
+
},
|
|
432
|
+
"file-file": {
|
|
433
|
+
title: "File",
|
|
434
|
+
description: "Upload or link a file."
|
|
435
|
+
},
|
|
436
|
+
"file-audio": {
|
|
437
|
+
title: "Audio",
|
|
438
|
+
description: "Upload or link audio."
|
|
439
|
+
},
|
|
440
|
+
"file-video": {
|
|
441
|
+
title: "Video upload",
|
|
442
|
+
description: "Upload or link a video."
|
|
443
|
+
},
|
|
444
|
+
mention: {
|
|
445
|
+
title: "Mention",
|
|
446
|
+
description: "Mention a person, page or date."
|
|
447
|
+
},
|
|
448
|
+
bulletList: {
|
|
449
|
+
title: "Bulleted list",
|
|
450
|
+
description: "A simple bulleted list."
|
|
451
|
+
},
|
|
452
|
+
orderedList: {
|
|
453
|
+
title: "Numbered list",
|
|
454
|
+
description: "A list with numbering."
|
|
455
|
+
},
|
|
456
|
+
taskList: {
|
|
457
|
+
title: "To-do list",
|
|
458
|
+
description: "Track tasks with checkboxes."
|
|
459
|
+
},
|
|
460
|
+
blockquote: {
|
|
461
|
+
title: "Quote",
|
|
462
|
+
description: "Capture a quote."
|
|
463
|
+
},
|
|
464
|
+
divider: {
|
|
465
|
+
title: "Divider",
|
|
466
|
+
description: "Visually divide blocks."
|
|
467
|
+
},
|
|
468
|
+
codeBlock: {
|
|
469
|
+
title: "Code",
|
|
470
|
+
description: "Code with syntax highlighting."
|
|
471
|
+
},
|
|
472
|
+
image: {
|
|
473
|
+
title: "Image",
|
|
474
|
+
description: "Upload or embed with a link."
|
|
475
|
+
},
|
|
476
|
+
embed: {
|
|
477
|
+
title: "Video / Embed",
|
|
478
|
+
description: "YouTube, Vimeo, any web page..."
|
|
479
|
+
},
|
|
480
|
+
callout: {
|
|
481
|
+
title: "Callout",
|
|
482
|
+
description: "Make writing stand out."
|
|
483
|
+
},
|
|
484
|
+
toggle: {
|
|
485
|
+
title: "Toggle",
|
|
486
|
+
description: "Hide content inside a toggle."
|
|
487
|
+
},
|
|
488
|
+
table: {
|
|
489
|
+
title: "Table",
|
|
490
|
+
description: "A simple 3×3 table."
|
|
491
|
+
},
|
|
492
|
+
columns2: {
|
|
493
|
+
title: "2 columns",
|
|
494
|
+
description: "Split content into 2 columns."
|
|
495
|
+
},
|
|
496
|
+
columns3: {
|
|
497
|
+
title: "3 columns",
|
|
498
|
+
description: "Split content into 3 columns."
|
|
499
|
+
},
|
|
500
|
+
columns4: {
|
|
501
|
+
title: "4 columns",
|
|
502
|
+
description: "Split content into 4 columns."
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
slash: {
|
|
506
|
+
empty: "No results",
|
|
507
|
+
results: "Results",
|
|
508
|
+
recent: "Recently used",
|
|
509
|
+
colors: "Colors",
|
|
510
|
+
textColor: (e) => `${e} text`,
|
|
511
|
+
bgColor: (e) => `${e} background`
|
|
512
|
+
},
|
|
513
|
+
handle: {
|
|
514
|
+
add: "to add below",
|
|
515
|
+
addAbove: "to add above",
|
|
516
|
+
drag: "to move",
|
|
517
|
+
menu: "to open menu",
|
|
518
|
+
dragVerb: "Drag",
|
|
519
|
+
clickVerb: "Click",
|
|
520
|
+
altClickVerb: "Alt-click"
|
|
521
|
+
},
|
|
522
|
+
blockMenu: {
|
|
523
|
+
delete: "Delete",
|
|
524
|
+
duplicate: "Duplicate",
|
|
525
|
+
turnInto: "Turn into",
|
|
526
|
+
color: "Color",
|
|
527
|
+
textColor: "Text color",
|
|
528
|
+
backgroundColor: "Background color",
|
|
529
|
+
recent: "Last used",
|
|
530
|
+
search: "Search actions...",
|
|
531
|
+
noResults: "No results",
|
|
532
|
+
moveUp: "Move up",
|
|
533
|
+
moveDown: "Move down",
|
|
534
|
+
copyLink: "Copy link to block",
|
|
535
|
+
linkCopied: "Link copied",
|
|
536
|
+
actions: "Actions",
|
|
537
|
+
selected: (e) => `${e} blocks`
|
|
538
|
+
},
|
|
539
|
+
colors: {
|
|
540
|
+
default: "Default",
|
|
541
|
+
gray: "Gray",
|
|
542
|
+
brown: "Brown",
|
|
543
|
+
orange: "Orange",
|
|
544
|
+
yellow: "Yellow",
|
|
545
|
+
green: "Green",
|
|
546
|
+
blue: "Blue",
|
|
547
|
+
purple: "Purple",
|
|
548
|
+
pink: "Pink",
|
|
549
|
+
red: "Red"
|
|
550
|
+
},
|
|
551
|
+
format: {
|
|
552
|
+
bold: "Bold",
|
|
553
|
+
italic: "Italic",
|
|
554
|
+
underline: "Underline",
|
|
555
|
+
strike: "Strikethrough",
|
|
556
|
+
code: "Code",
|
|
557
|
+
link: "Link",
|
|
558
|
+
color: "Color",
|
|
559
|
+
linkPlaceholder: "Paste link...",
|
|
560
|
+
removeLink: "Remove link",
|
|
561
|
+
apply: "OK"
|
|
562
|
+
},
|
|
563
|
+
image: {
|
|
564
|
+
upload: "Upload",
|
|
565
|
+
link: "Embed link",
|
|
566
|
+
choose: "Choose an image",
|
|
567
|
+
dropHint: (e) => `Or drop an image here · max ${e}MB`,
|
|
568
|
+
insert: "Embed image",
|
|
569
|
+
notImage: "This file is not an image.",
|
|
570
|
+
tooLarge: (e) => `Images can be at most ${e}MB.`,
|
|
571
|
+
invalidLink: "Invalid image link.",
|
|
572
|
+
caption: "Write a caption...",
|
|
573
|
+
uploading: "Uploading...",
|
|
574
|
+
uploadFailed: "Upload failed.",
|
|
575
|
+
align: "Align",
|
|
576
|
+
alignments: {
|
|
577
|
+
left: "Align left",
|
|
578
|
+
center: "Align center",
|
|
579
|
+
right: "Align right"
|
|
580
|
+
},
|
|
581
|
+
captionToggle: "Caption",
|
|
582
|
+
crop: "Crop",
|
|
583
|
+
cropDone: "Done",
|
|
584
|
+
cropCancel: "Cancel",
|
|
585
|
+
cropReset: "Reset",
|
|
586
|
+
zoom: "View full size",
|
|
587
|
+
zoomIn: "Zoom in",
|
|
588
|
+
zoomOut: "Zoom out",
|
|
589
|
+
zoomReset: "Reset to 100%",
|
|
590
|
+
download: "Download",
|
|
591
|
+
more: "More",
|
|
592
|
+
replace: "Replace",
|
|
593
|
+
copyLink: "Copy image link",
|
|
594
|
+
linkCopied: "Copied",
|
|
595
|
+
original: "View original",
|
|
596
|
+
delete: "Delete",
|
|
597
|
+
close: "Close"
|
|
598
|
+
},
|
|
599
|
+
embed: {
|
|
600
|
+
hint: "Embed a video or web page (YouTube, Vimeo, Loom, Figma, Google Maps...)",
|
|
601
|
+
placeholder: "Paste a link...",
|
|
602
|
+
submit: "Embed",
|
|
603
|
+
invalid: "Invalid link (http/https only)."
|
|
604
|
+
},
|
|
605
|
+
callout: {
|
|
606
|
+
change: "Change icon / color",
|
|
607
|
+
icon: "Icon",
|
|
608
|
+
background: "Background"
|
|
609
|
+
},
|
|
610
|
+
code: {
|
|
611
|
+
copy: "Copy",
|
|
612
|
+
copied: "Copied"
|
|
613
|
+
},
|
|
614
|
+
unknownBlock: "Unsupported block",
|
|
615
|
+
invalidBlock: "Invalid block data (kept as is)",
|
|
616
|
+
contentError: "This content can't be read. The editor is read-only so saved data isn't overwritten.",
|
|
617
|
+
toc: {
|
|
618
|
+
empty: "Add headings to build a table of contents.",
|
|
619
|
+
untitled: "Untitled",
|
|
620
|
+
title: "Table of contents"
|
|
621
|
+
},
|
|
622
|
+
table: {
|
|
623
|
+
rowMenu: "Click to open the row menu",
|
|
624
|
+
columnMenu: "Click to open the column menu",
|
|
625
|
+
headerRow: "Header row",
|
|
626
|
+
headerColumn: "Header column",
|
|
627
|
+
insertAbove: "Insert above",
|
|
628
|
+
insertBelow: "Insert below",
|
|
629
|
+
insertLeft: "Insert left",
|
|
630
|
+
insertRight: "Insert right",
|
|
631
|
+
duplicate: "Duplicate",
|
|
632
|
+
moveUp: "Move up",
|
|
633
|
+
moveDown: "Move down",
|
|
634
|
+
moveLeft: "Move left",
|
|
635
|
+
moveRight: "Move right",
|
|
636
|
+
clear: "Clear contents",
|
|
637
|
+
color: "Background color",
|
|
638
|
+
deleteRow: "Delete row",
|
|
639
|
+
deleteColumn: "Delete column",
|
|
640
|
+
merge: "Merge cells",
|
|
641
|
+
split: "Split cell",
|
|
642
|
+
addRow: "Add a row",
|
|
643
|
+
addColumn: "Add a column"
|
|
644
|
+
},
|
|
645
|
+
math: {
|
|
646
|
+
placeholder: "Add an equation",
|
|
647
|
+
inputPlaceholder: "Type LaTeX, e.g. E = mc^2",
|
|
648
|
+
hintBlock: "⌘ + Enter to finish",
|
|
649
|
+
hintInline: "Enter to finish",
|
|
650
|
+
missing: "Install the \"katex\" package to render equations."
|
|
651
|
+
},
|
|
652
|
+
mermaid: {
|
|
653
|
+
preview: "Diagram preview",
|
|
654
|
+
invalid: "Invalid Mermaid syntax.",
|
|
655
|
+
missing: "Install the \"mermaid\" package to render diagrams."
|
|
656
|
+
},
|
|
657
|
+
html: {
|
|
658
|
+
title: "HTML",
|
|
659
|
+
code: "Code",
|
|
660
|
+
preview: "Preview",
|
|
661
|
+
upload: "Upload .html file",
|
|
662
|
+
uploadFile: "Upload file",
|
|
663
|
+
write: "Write code",
|
|
664
|
+
expand: "Expand",
|
|
665
|
+
close: "Close",
|
|
666
|
+
interact: "Interact",
|
|
667
|
+
emptyHint: "Run HTML, CSS and JavaScript right on the page (calculators, quizzes, diagrams, prototypes...).",
|
|
668
|
+
placeholder: "<!-- Write or paste HTML here -->",
|
|
669
|
+
wrongType: "Only .html files are supported.",
|
|
670
|
+
tooLarge: (e) => `Max file size is ${e >= 1024 ? `${Math.round(e / 1024)}MB` : `${e}KB`}.`
|
|
671
|
+
},
|
|
672
|
+
file: {
|
|
673
|
+
upload: "Upload",
|
|
674
|
+
link: "Embed link",
|
|
675
|
+
embed: "Embed",
|
|
676
|
+
chooseFile: "Choose a file",
|
|
677
|
+
chooseAudio: "Choose audio",
|
|
678
|
+
chooseVideo: "Choose a video",
|
|
679
|
+
dropHint: (e) => `Or drop it here · max ${e}MB`,
|
|
680
|
+
tooLarge: (e) => `Files can be at most ${e}MB.`,
|
|
681
|
+
wrongType: "Unsupported file type.",
|
|
682
|
+
uploadFailed: "Upload failed.",
|
|
683
|
+
invalidLink: "Invalid link.",
|
|
684
|
+
uploading: "Uploading...",
|
|
685
|
+
download: "Download"
|
|
686
|
+
},
|
|
687
|
+
datePicker: {
|
|
688
|
+
endDate: "End date",
|
|
689
|
+
dateFormat: "Date format",
|
|
690
|
+
includeTime: "Include time",
|
|
691
|
+
timeFormat: "Time format",
|
|
692
|
+
hour12: "12 hour",
|
|
693
|
+
hour24: "24 hour",
|
|
694
|
+
remind: "Remind",
|
|
695
|
+
clear: "Clear",
|
|
696
|
+
learnReminders: "Learn about reminders",
|
|
697
|
+
prevMonth: "Previous month",
|
|
698
|
+
nextMonth: "Next month",
|
|
699
|
+
formats: {
|
|
700
|
+
full: "Full date",
|
|
701
|
+
short: "Short date",
|
|
702
|
+
mdy: "Month/Day/Year",
|
|
703
|
+
dmy: "Day/Month/Year",
|
|
704
|
+
ymd: "Year/Month/Day",
|
|
705
|
+
relative: "Relative"
|
|
706
|
+
},
|
|
707
|
+
reminders: {
|
|
708
|
+
none: "None",
|
|
709
|
+
day: "On day of event (9:00 AM)",
|
|
710
|
+
at: "At time of event",
|
|
711
|
+
"5m": "5 minutes before",
|
|
712
|
+
"10m": "10 minutes before",
|
|
713
|
+
"15m": "15 minutes before",
|
|
714
|
+
"30m": "30 minutes before",
|
|
715
|
+
"1h": "1 hour before",
|
|
716
|
+
"2h": "2 hours before",
|
|
717
|
+
"1d": "1 day before",
|
|
718
|
+
"2d": "2 days before",
|
|
719
|
+
"1w": "1 week before"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
mention: {
|
|
723
|
+
today: "Today",
|
|
724
|
+
tomorrow: "Tomorrow",
|
|
725
|
+
yesterday: "Yesterday",
|
|
726
|
+
people: "People",
|
|
727
|
+
pages: "Pages",
|
|
728
|
+
dates: "Dates",
|
|
729
|
+
empty: "No results",
|
|
730
|
+
searchPlaceholder: "Search people or pages...",
|
|
731
|
+
noSearch: "Search is not configured (mention.configure({ search }))",
|
|
732
|
+
openPage: "Open page",
|
|
733
|
+
prevMonth: "Previous month",
|
|
734
|
+
nextMonth: "Next month"
|
|
735
|
+
}
|
|
736
|
+
}, n = {
|
|
737
|
+
placeholder: "输入“/”选择块类型...",
|
|
738
|
+
headingPlaceholder: (e) => `标题 ${e}`,
|
|
739
|
+
togglePlaceholder: "折叠列表",
|
|
740
|
+
groups: {
|
|
741
|
+
basic: "基础块",
|
|
742
|
+
media: "媒体",
|
|
743
|
+
advanced: "高级",
|
|
744
|
+
layout: "布局"
|
|
745
|
+
},
|
|
746
|
+
blocks: {
|
|
747
|
+
paragraph: {
|
|
748
|
+
title: "文本",
|
|
749
|
+
description: "普通文本段落。"
|
|
750
|
+
},
|
|
751
|
+
heading1: {
|
|
752
|
+
title: "标题 1",
|
|
753
|
+
description: "一级标题。"
|
|
754
|
+
},
|
|
755
|
+
heading2: {
|
|
756
|
+
title: "标题 2",
|
|
757
|
+
description: "二级标题。"
|
|
758
|
+
},
|
|
759
|
+
heading3: {
|
|
760
|
+
title: "标题 3",
|
|
761
|
+
description: "三级标题。"
|
|
762
|
+
},
|
|
763
|
+
heading4: {
|
|
764
|
+
title: "标题 4",
|
|
765
|
+
description: "四级标题。"
|
|
766
|
+
},
|
|
767
|
+
toggleHeading1: {
|
|
768
|
+
title: "折叠标题 1",
|
|
769
|
+
description: "可折叠的一级标题。"
|
|
770
|
+
},
|
|
771
|
+
toggleHeading2: {
|
|
772
|
+
title: "折叠标题 2",
|
|
773
|
+
description: "可折叠的二级标题。"
|
|
774
|
+
},
|
|
775
|
+
toggleHeading3: {
|
|
776
|
+
title: "折叠标题 3",
|
|
777
|
+
description: "可折叠的三级标题。"
|
|
778
|
+
},
|
|
779
|
+
toc: {
|
|
780
|
+
title: "目录",
|
|
781
|
+
description: "根据标题自动生成。"
|
|
782
|
+
},
|
|
783
|
+
mathBlock: {
|
|
784
|
+
title: "公式块",
|
|
785
|
+
description: "使用 LaTeX 编写数学公式。"
|
|
786
|
+
},
|
|
787
|
+
mathInline: {
|
|
788
|
+
title: "行内公式",
|
|
789
|
+
description: "嵌入句子中的公式。"
|
|
790
|
+
},
|
|
791
|
+
mermaid: {
|
|
792
|
+
title: "Mermaid 图表",
|
|
793
|
+
description: "流程图、时序图、甘特图..."
|
|
794
|
+
},
|
|
795
|
+
html: {
|
|
796
|
+
title: "HTML",
|
|
797
|
+
description: "在页面中运行交互式 HTML/CSS/JS。"
|
|
798
|
+
},
|
|
799
|
+
"file-file": {
|
|
800
|
+
title: "文件",
|
|
801
|
+
description: "上传文件或粘贴文件链接。"
|
|
802
|
+
},
|
|
803
|
+
"file-audio": {
|
|
804
|
+
title: "音频",
|
|
805
|
+
description: "上传音频或粘贴音频链接。"
|
|
806
|
+
},
|
|
807
|
+
"file-video": {
|
|
808
|
+
title: "上传视频",
|
|
809
|
+
description: "上传视频或粘贴视频链接。"
|
|
810
|
+
},
|
|
811
|
+
mention: {
|
|
812
|
+
title: "提及",
|
|
813
|
+
description: "提及成员、页面或日期。"
|
|
814
|
+
},
|
|
815
|
+
bulletList: {
|
|
816
|
+
title: "无序列表",
|
|
817
|
+
description: "简单的项目符号列表。"
|
|
818
|
+
},
|
|
819
|
+
orderedList: {
|
|
820
|
+
title: "有序列表",
|
|
821
|
+
description: "带编号的列表。"
|
|
822
|
+
},
|
|
823
|
+
taskList: {
|
|
824
|
+
title: "待办清单",
|
|
825
|
+
description: "用复选框跟踪任务。"
|
|
826
|
+
},
|
|
827
|
+
blockquote: {
|
|
828
|
+
title: "引用",
|
|
829
|
+
description: "引用一段文字。"
|
|
830
|
+
},
|
|
831
|
+
divider: {
|
|
832
|
+
title: "分割线",
|
|
833
|
+
description: "在内容之间添加分隔。"
|
|
834
|
+
},
|
|
835
|
+
codeBlock: {
|
|
836
|
+
title: "代码",
|
|
837
|
+
description: "支持语法高亮的代码块。"
|
|
838
|
+
},
|
|
839
|
+
image: {
|
|
840
|
+
title: "图片",
|
|
841
|
+
description: "上传图片或通过链接嵌入。"
|
|
842
|
+
},
|
|
843
|
+
embed: {
|
|
844
|
+
title: "视频 / 嵌入",
|
|
845
|
+
description: "嵌入 YouTube、Vimeo 或任意网页..."
|
|
846
|
+
},
|
|
847
|
+
callout: {
|
|
848
|
+
title: "标注",
|
|
849
|
+
description: "带图标的醒目提示块。"
|
|
850
|
+
},
|
|
851
|
+
toggle: {
|
|
852
|
+
title: "折叠列表",
|
|
853
|
+
description: "可展开 / 收起的内容块。"
|
|
854
|
+
},
|
|
855
|
+
table: {
|
|
856
|
+
title: "表格",
|
|
857
|
+
description: "简单的 3×3 表格。"
|
|
858
|
+
},
|
|
859
|
+
columns2: {
|
|
860
|
+
title: "2 栏",
|
|
861
|
+
description: "将内容分为 2 栏。"
|
|
862
|
+
},
|
|
863
|
+
columns3: {
|
|
864
|
+
title: "3 栏",
|
|
865
|
+
description: "将内容分为 3 栏。"
|
|
866
|
+
},
|
|
867
|
+
columns4: {
|
|
868
|
+
title: "4 栏",
|
|
869
|
+
description: "将内容分为 4 栏。"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
slash: {
|
|
873
|
+
empty: "没有找到匹配的块",
|
|
874
|
+
results: "搜索结果",
|
|
875
|
+
recent: "最近使用",
|
|
876
|
+
colors: "颜色",
|
|
877
|
+
textColor: (e) => `${e}文字`,
|
|
878
|
+
bgColor: (e) => `${e}背景`
|
|
879
|
+
},
|
|
880
|
+
handle: {
|
|
881
|
+
add: "在下方添加块",
|
|
882
|
+
addAbove: "在上方添加",
|
|
883
|
+
drag: "移动",
|
|
884
|
+
menu: "打开菜单",
|
|
885
|
+
dragVerb: "拖动",
|
|
886
|
+
clickVerb: "点击",
|
|
887
|
+
altClickVerb: "Alt+点击"
|
|
888
|
+
},
|
|
889
|
+
blockMenu: {
|
|
890
|
+
delete: "删除",
|
|
891
|
+
duplicate: "创建副本",
|
|
892
|
+
turnInto: "转换为",
|
|
893
|
+
color: "颜色",
|
|
894
|
+
textColor: "文字颜色",
|
|
895
|
+
backgroundColor: "背景颜色",
|
|
896
|
+
recent: "最近使用",
|
|
897
|
+
search: "搜索操作...",
|
|
898
|
+
noResults: "无结果",
|
|
899
|
+
moveUp: "上移",
|
|
900
|
+
moveDown: "下移",
|
|
901
|
+
copyLink: "复制块链接",
|
|
902
|
+
linkCopied: "链接已复制",
|
|
903
|
+
actions: "操作",
|
|
904
|
+
selected: (e) => `${e} 个块`
|
|
905
|
+
},
|
|
906
|
+
colors: {
|
|
907
|
+
default: "默认",
|
|
908
|
+
gray: "灰色",
|
|
909
|
+
brown: "棕色",
|
|
910
|
+
orange: "橙色",
|
|
911
|
+
yellow: "黄色",
|
|
912
|
+
green: "绿色",
|
|
913
|
+
blue: "蓝色",
|
|
914
|
+
purple: "紫色",
|
|
915
|
+
pink: "粉色",
|
|
916
|
+
red: "红色"
|
|
917
|
+
},
|
|
918
|
+
format: {
|
|
919
|
+
bold: "加粗",
|
|
920
|
+
italic: "斜体",
|
|
921
|
+
underline: "下划线",
|
|
922
|
+
strike: "删除线",
|
|
923
|
+
code: "代码",
|
|
924
|
+
link: "链接",
|
|
925
|
+
color: "颜色",
|
|
926
|
+
linkPlaceholder: "粘贴链接...",
|
|
927
|
+
removeLink: "移除链接",
|
|
928
|
+
apply: "确定"
|
|
929
|
+
},
|
|
930
|
+
image: {
|
|
931
|
+
upload: "上传",
|
|
932
|
+
link: "嵌入链接",
|
|
933
|
+
choose: "选择图片",
|
|
934
|
+
dropHint: (e) => `或将图片拖放到此处 · 最大 ${e}MB`,
|
|
935
|
+
insert: "嵌入图片",
|
|
936
|
+
notImage: "该文件不是图片。",
|
|
937
|
+
tooLarge: (e) => `图片不能超过 ${e}MB。`,
|
|
938
|
+
invalidLink: "图片链接无效。",
|
|
939
|
+
caption: "添加说明...",
|
|
940
|
+
uploading: "正在上传...",
|
|
941
|
+
uploadFailed: "上传失败。",
|
|
942
|
+
align: "对齐",
|
|
943
|
+
alignments: {
|
|
944
|
+
left: "左对齐",
|
|
945
|
+
center: "居中",
|
|
946
|
+
right: "右对齐"
|
|
947
|
+
},
|
|
948
|
+
captionToggle: "说明",
|
|
949
|
+
crop: "裁剪",
|
|
950
|
+
cropDone: "完成",
|
|
951
|
+
cropCancel: "取消",
|
|
952
|
+
cropReset: "重置",
|
|
953
|
+
zoom: "查看大图",
|
|
954
|
+
zoomIn: "放大",
|
|
955
|
+
zoomOut: "缩小",
|
|
956
|
+
zoomReset: "恢复 100%",
|
|
957
|
+
download: "下载",
|
|
958
|
+
more: "更多",
|
|
959
|
+
replace: "替换",
|
|
960
|
+
copyLink: "复制图片链接",
|
|
961
|
+
linkCopied: "已复制",
|
|
962
|
+
original: "查看原图",
|
|
963
|
+
delete: "删除",
|
|
964
|
+
close: "关闭"
|
|
965
|
+
},
|
|
966
|
+
embed: {
|
|
967
|
+
hint: "嵌入视频或网页(YouTube、Vimeo、Loom、Figma、Google 地图...)",
|
|
968
|
+
placeholder: "粘贴链接...",
|
|
969
|
+
submit: "嵌入",
|
|
970
|
+
invalid: "链接无效(仅支持 http/https)。"
|
|
971
|
+
},
|
|
972
|
+
callout: {
|
|
973
|
+
change: "更改图标 / 颜色",
|
|
974
|
+
icon: "图标",
|
|
975
|
+
background: "背景"
|
|
976
|
+
},
|
|
977
|
+
code: {
|
|
978
|
+
copy: "复制",
|
|
979
|
+
copied: "已复制"
|
|
980
|
+
},
|
|
981
|
+
unknownBlock: "不支持的块",
|
|
982
|
+
invalidBlock: "块数据有误(已原样保留)",
|
|
983
|
+
contentError: "无法读取此内容。编辑器已切换为只读模式,以免覆盖已保存的数据。",
|
|
984
|
+
toc: {
|
|
985
|
+
empty: "添加标题以生成目录。",
|
|
986
|
+
untitled: "无标题",
|
|
987
|
+
title: "目录"
|
|
988
|
+
},
|
|
989
|
+
table: {
|
|
990
|
+
rowMenu: "点击打开行菜单",
|
|
991
|
+
columnMenu: "点击打开列菜单",
|
|
992
|
+
headerRow: "标题行",
|
|
993
|
+
headerColumn: "标题列",
|
|
994
|
+
insertAbove: "在上方插入",
|
|
995
|
+
insertBelow: "在下方插入",
|
|
996
|
+
insertLeft: "在左侧插入",
|
|
997
|
+
insertRight: "在右侧插入",
|
|
998
|
+
duplicate: "创建副本",
|
|
999
|
+
moveUp: "上移",
|
|
1000
|
+
moveDown: "下移",
|
|
1001
|
+
moveLeft: "左移",
|
|
1002
|
+
moveRight: "右移",
|
|
1003
|
+
clear: "清除内容",
|
|
1004
|
+
color: "背景颜色",
|
|
1005
|
+
deleteRow: "删除行",
|
|
1006
|
+
deleteColumn: "删除列",
|
|
1007
|
+
merge: "合并单元格",
|
|
1008
|
+
split: "拆分单元格",
|
|
1009
|
+
addRow: "添加一行",
|
|
1010
|
+
addColumn: "添加一列"
|
|
1011
|
+
},
|
|
1012
|
+
math: {
|
|
1013
|
+
placeholder: "添加公式",
|
|
1014
|
+
inputPlaceholder: "输入 LaTeX,例如 E = mc^2",
|
|
1015
|
+
hintBlock: "⌘ + Enter 完成",
|
|
1016
|
+
hintInline: "Enter 完成",
|
|
1017
|
+
missing: "请安装 \"katex\" 包以显示公式。"
|
|
1018
|
+
},
|
|
1019
|
+
mermaid: {
|
|
1020
|
+
preview: "图表预览",
|
|
1021
|
+
invalid: "Mermaid 语法有误。",
|
|
1022
|
+
missing: "请安装 \"mermaid\" 包以显示图表。"
|
|
1023
|
+
},
|
|
1024
|
+
html: {
|
|
1025
|
+
title: "HTML",
|
|
1026
|
+
code: "代码",
|
|
1027
|
+
preview: "预览",
|
|
1028
|
+
upload: "上传 .html 文件",
|
|
1029
|
+
uploadFile: "上传文件",
|
|
1030
|
+
write: "编写代码",
|
|
1031
|
+
expand: "展开",
|
|
1032
|
+
close: "关闭",
|
|
1033
|
+
interact: "交互",
|
|
1034
|
+
emptyHint: "直接在页面中运行 HTML、CSS 和 JavaScript(计算器、测验、图表、原型...)。",
|
|
1035
|
+
placeholder: "<!-- 在此编写或粘贴 HTML 代码 -->",
|
|
1036
|
+
wrongType: "仅支持 .html 文件。",
|
|
1037
|
+
tooLarge: (e) => `文件不能超过 ${e >= 1024 ? `${Math.round(e / 1024)}MB` : `${e}KB`}。`
|
|
1038
|
+
},
|
|
1039
|
+
file: {
|
|
1040
|
+
upload: "上传",
|
|
1041
|
+
link: "嵌入链接",
|
|
1042
|
+
embed: "嵌入",
|
|
1043
|
+
chooseFile: "选择文件",
|
|
1044
|
+
chooseAudio: "选择音频",
|
|
1045
|
+
chooseVideo: "选择视频",
|
|
1046
|
+
dropHint: (e) => `或拖放到此处 · 最大 ${e}MB`,
|
|
1047
|
+
tooLarge: (e) => `文件不能超过 ${e}MB。`,
|
|
1048
|
+
wrongType: "不支持该文件类型。",
|
|
1049
|
+
uploadFailed: "上传失败。",
|
|
1050
|
+
invalidLink: "链接无效。",
|
|
1051
|
+
uploading: "正在上传...",
|
|
1052
|
+
download: "下载"
|
|
1053
|
+
},
|
|
1054
|
+
datePicker: {
|
|
1055
|
+
endDate: "结束日期",
|
|
1056
|
+
dateFormat: "日期格式",
|
|
1057
|
+
includeTime: "包含时间",
|
|
1058
|
+
timeFormat: "时间格式",
|
|
1059
|
+
hour12: "12 小时制",
|
|
1060
|
+
hour24: "24 小时制",
|
|
1061
|
+
remind: "提醒",
|
|
1062
|
+
clear: "清除",
|
|
1063
|
+
learnReminders: "了解提醒功能",
|
|
1064
|
+
prevMonth: "上个月",
|
|
1065
|
+
nextMonth: "下个月",
|
|
1066
|
+
formats: {
|
|
1067
|
+
full: "完整日期",
|
|
1068
|
+
short: "简短日期",
|
|
1069
|
+
mdy: "月/日/年",
|
|
1070
|
+
dmy: "日/月/年",
|
|
1071
|
+
ymd: "年/月/日",
|
|
1072
|
+
relative: "相对日期"
|
|
1073
|
+
},
|
|
1074
|
+
reminders: {
|
|
1075
|
+
none: "无",
|
|
1076
|
+
day: "当天(上午 9:00)",
|
|
1077
|
+
at: "事件发生时",
|
|
1078
|
+
"5m": "提前 5 分钟",
|
|
1079
|
+
"10m": "提前 10 分钟",
|
|
1080
|
+
"15m": "提前 15 分钟",
|
|
1081
|
+
"30m": "提前 30 分钟",
|
|
1082
|
+
"1h": "提前 1 小时",
|
|
1083
|
+
"2h": "提前 2 小时",
|
|
1084
|
+
"1d": "提前 1 天",
|
|
1085
|
+
"2d": "提前 2 天",
|
|
1086
|
+
"1w": "提前 1 周"
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
mention: {
|
|
1090
|
+
today: "今天",
|
|
1091
|
+
tomorrow: "明天",
|
|
1092
|
+
yesterday: "昨天",
|
|
1093
|
+
people: "成员",
|
|
1094
|
+
pages: "页面",
|
|
1095
|
+
dates: "日期",
|
|
1096
|
+
empty: "无结果",
|
|
1097
|
+
searchPlaceholder: "搜索成员或页面...",
|
|
1098
|
+
noSearch: "尚未配置搜索(mention.configure({ search }))",
|
|
1099
|
+
openPage: "打开页面",
|
|
1100
|
+
prevMonth: "上个月",
|
|
1101
|
+
nextMonth: "下个月"
|
|
1102
|
+
}
|
|
1103
|
+
}, r = {
|
|
1104
|
+
vi: e,
|
|
1105
|
+
en: t,
|
|
1106
|
+
zh: n
|
|
1107
|
+
};
|
|
1108
|
+
function i(t = "vi", ...n) {
|
|
1109
|
+
let i = { ...r[t] ?? e };
|
|
1110
|
+
for (let e of n) if (e) for (let [t, n] of Object.entries(e)) {
|
|
1111
|
+
let e = i[t];
|
|
1112
|
+
i[t] = n && typeof n == "object" && e && typeof e == "object" ? {
|
|
1113
|
+
...e,
|
|
1114
|
+
...n
|
|
1115
|
+
} : n;
|
|
1116
|
+
}
|
|
1117
|
+
return i;
|
|
1118
|
+
}
|
|
1119
|
+
// src/extensions/code-languages.ts
|
|
1120
|
+
var a = {
|
|
1121
|
+
js: "javascript",
|
|
1122
|
+
ts: "typescript",
|
|
1123
|
+
sh: "bash",
|
|
1124
|
+
zsh: "bash",
|
|
1125
|
+
html: "xml",
|
|
1126
|
+
vue: "xml",
|
|
1127
|
+
py: "python",
|
|
1128
|
+
yml: "yaml",
|
|
1129
|
+
md: "markdown",
|
|
1130
|
+
"c++": "cpp",
|
|
1131
|
+
cs: "csharp",
|
|
1132
|
+
rb: "ruby",
|
|
1133
|
+
rs: "rust",
|
|
1134
|
+
kt: "kotlin",
|
|
1135
|
+
golang: "go"
|
|
1136
|
+
};
|
|
1137
|
+
// src/extensions/embed-url.ts
|
|
1138
|
+
function o(e) {
|
|
1139
|
+
let t;
|
|
1140
|
+
try {
|
|
1141
|
+
t = new URL(e.trim());
|
|
1142
|
+
} catch {
|
|
1143
|
+
return null;
|
|
1144
|
+
}
|
|
1145
|
+
if (!/^https?:$/.test(t.protocol)) return null;
|
|
1146
|
+
let n = t.hostname.replace(/^www\./, "");
|
|
1147
|
+
if (n === "youtu.be") return `https://www.youtube.com/embed/${t.pathname.slice(1)}`;
|
|
1148
|
+
if (n.endsWith("youtube.com")) {
|
|
1149
|
+
let e = t.searchParams.get("v") ?? t.pathname.match(/\/(?:embed|shorts)\/([^/]+)/)?.[1];
|
|
1150
|
+
if (e) return `https://www.youtube.com/embed/${e}`;
|
|
1151
|
+
}
|
|
1152
|
+
if (n === "vimeo.com") {
|
|
1153
|
+
let e = t.pathname.match(/\/(\d+)/)?.[1];
|
|
1154
|
+
if (e) return `https://player.vimeo.com/video/${e}`;
|
|
1155
|
+
}
|
|
1156
|
+
if (n === "loom.com") {
|
|
1157
|
+
let e = t.pathname.match(/\/share\/([^/]+)/)?.[1];
|
|
1158
|
+
if (e) return `https://www.loom.com/embed/${e}`;
|
|
1159
|
+
}
|
|
1160
|
+
return t.toString();
|
|
1161
|
+
}
|
|
1162
|
+
// src/extensions/html-document.ts
|
|
1163
|
+
var s = 2e3;
|
|
1164
|
+
function c(e) {
|
|
1165
|
+
if (e === !0) return null;
|
|
1166
|
+
let t = Array.isArray(e) ? e.filter((e) => /^https?:\/\/[\w.-]+(?::\d+)?$/.test(e)).join(" ") : "", n = (e) => `${e}${t ? ` ${t}` : ""}`;
|
|
1167
|
+
return [
|
|
1168
|
+
"default-src 'none'",
|
|
1169
|
+
`script-src ${n("'unsafe-inline' 'unsafe-eval' data: blob:")}`,
|
|
1170
|
+
`style-src ${n("'unsafe-inline' data:")}`,
|
|
1171
|
+
`img-src ${n("data: blob:")}`,
|
|
1172
|
+
`font-src ${n("data:")}`,
|
|
1173
|
+
`media-src ${n("data: blob:")}`,
|
|
1174
|
+
`connect-src ${t || "'none'"}`,
|
|
1175
|
+
"frame-src 'none'",
|
|
1176
|
+
"form-action 'none'",
|
|
1177
|
+
"base-uri 'none'"
|
|
1178
|
+
].join("; ");
|
|
1179
|
+
}
|
|
1180
|
+
function l(e, t) {
|
|
1181
|
+
let n = c(t);
|
|
1182
|
+
return `<!doctype html><html><head>${[
|
|
1183
|
+
"<meta charset=\"utf-8\">",
|
|
1184
|
+
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
|
|
1185
|
+
n ? `<meta http-equiv="Content-Security-Policy" content="${n}">` : ""
|
|
1186
|
+
].join("")}</head><body>${e}</body></html>`;
|
|
1187
|
+
}
|
|
1188
|
+
// src/date-utils.ts
|
|
1189
|
+
var u = (e) => String(e).padStart(2, "0"), d = [
|
|
1190
|
+
"full",
|
|
1191
|
+
"short",
|
|
1192
|
+
"mdy",
|
|
1193
|
+
"dmy",
|
|
1194
|
+
"ymd",
|
|
1195
|
+
"relative"
|
|
1196
|
+
], f = (e) => `${e.getFullYear()}-${u(e.getMonth() + 1)}-${u(e.getDate())}`;
|
|
1197
|
+
function p(e) {
|
|
1198
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e ?? "");
|
|
1199
|
+
return t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3])) : null;
|
|
1200
|
+
}
|
|
1201
|
+
var m = (e) => {
|
|
1202
|
+
let t = /* @__PURE__ */ new Date(), n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), r = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
1203
|
+
return Math.round((n - r) / 864e5);
|
|
1204
|
+
};
|
|
1205
|
+
function h(e, t, n = "relative", r) {
|
|
1206
|
+
let i = p(e);
|
|
1207
|
+
if (!i) return e;
|
|
1208
|
+
let a = u(i.getDate()), o = u(i.getMonth() + 1), s = i.getFullYear();
|
|
1209
|
+
switch (n) {
|
|
1210
|
+
case "full": return new Intl.DateTimeFormat(t, {
|
|
1211
|
+
day: "numeric",
|
|
1212
|
+
month: "long",
|
|
1213
|
+
year: "numeric"
|
|
1214
|
+
}).format(i);
|
|
1215
|
+
case "mdy": return `${o}/${a}/${s}`;
|
|
1216
|
+
case "dmy": return `${a}/${o}/${s}`;
|
|
1217
|
+
case "ymd": return `${s}/${o}/${a}`;
|
|
1218
|
+
case "relative": {
|
|
1219
|
+
let e = m(i);
|
|
1220
|
+
return r && e === 0 ? r.today : r && e === 1 ? r.tomorrow : r && e === -1 ? r.yesterday : new Intl.DateTimeFormat(t, {
|
|
1221
|
+
day: "numeric",
|
|
1222
|
+
month: "short",
|
|
1223
|
+
year: e > -180 && e < 180 && i.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? void 0 : "numeric"
|
|
1224
|
+
}).format(i);
|
|
1225
|
+
}
|
|
1226
|
+
default: return new Intl.DateTimeFormat(t, {
|
|
1227
|
+
day: "numeric",
|
|
1228
|
+
month: "short",
|
|
1229
|
+
year: "numeric"
|
|
1230
|
+
}).format(i);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
function g(e, t, n = "24") {
|
|
1234
|
+
let [r, i] = e.split(":").map(Number);
|
|
1235
|
+
return r === void 0 || i === void 0 || Number.isNaN(r) || Number.isNaN(i) ? e : new Intl.DateTimeFormat(t, {
|
|
1236
|
+
hour: "numeric",
|
|
1237
|
+
minute: "2-digit",
|
|
1238
|
+
hour12: n === "12"
|
|
1239
|
+
}).format(new Date(2e3, 0, 1, r, i));
|
|
1240
|
+
}
|
|
1241
|
+
function _(e, t, n) {
|
|
1242
|
+
let r = (r, i) => {
|
|
1243
|
+
let a = h(r, t, e.format ?? "relative", n);
|
|
1244
|
+
return i ? `${a} ${g(i, t, e.timeFormat ?? "24")}` : a;
|
|
1245
|
+
}, i = r(e.start, e.time);
|
|
1246
|
+
return e.end ? `${i} → ${r(e.end, e.endTime ?? (e.time ? e.time : null))}` : i;
|
|
1247
|
+
}
|
|
1248
|
+
function v(e, t) {
|
|
1249
|
+
let n = e.trim(), r = /^(?:(\d{4})\s*年\s*)?(\d{1,2})\s*月\s*(\d{1,2})\s*[日号]?$/.exec(n);
|
|
1250
|
+
if (r) return y(r[1] ? Number(r[1]) : (/* @__PURE__ */ new Date()).getFullYear(), Number(r[2]), Number(r[3]));
|
|
1251
|
+
if (r = /^(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})$/.exec(n), r) return y(Number(r[1]), Number(r[2]), Number(r[3]));
|
|
1252
|
+
if (r = /^(\d{1,2})[-/.](\d{1,2})(?:[-/.](\d{2,4}))?$/.exec(n), r) {
|
|
1253
|
+
let e = r[3] ? Number(r[3].length === 2 ? `20${r[3]}` : r[3]) : (/* @__PURE__ */ new Date()).getFullYear(), [n, i] = [Number(r[1]), Number(r[2])];
|
|
1254
|
+
return t.startsWith("en") ? y(e, n, i) : y(e, i, n);
|
|
1255
|
+
}
|
|
1256
|
+
let i = Date.parse(n);
|
|
1257
|
+
return Number.isNaN(i) ? null : f(new Date(i));
|
|
1258
|
+
}
|
|
1259
|
+
function y(e, t, n) {
|
|
1260
|
+
let r = new Date(e, t - 1, n);
|
|
1261
|
+
return r.getFullYear() === e && r.getMonth() === t - 1 && r.getDate() === n ? f(r) : null;
|
|
1262
|
+
}
|
|
1263
|
+
function b(e) {
|
|
1264
|
+
let t = e.trim(), n = /^(上午|早上|中午|下午|晚上)\s*/.exec(t), r = /^(\d{1,2})(?:[:.h点時时](\d{2})?分?)?\s*(am|pm|sa|ch)?$/i.exec(n ? t.slice(n[0].length) : t);
|
|
1265
|
+
if (!r) return null;
|
|
1266
|
+
let i = Number(r[1]), a = Number(r[2] ?? 0), o = n ? n[1] === "上午" || n[1] === "早上" ? "am" : n[1] === "中午" ? i < 11 ? "pm" : void 0 : "pm" : r[3]?.toLowerCase();
|
|
1267
|
+
return o === "pm" || o === "ch" ? i = i % 12 + 12 : (o === "am" || o === "sa") && (i %= 12), i < 24 && a < 60 ? `${u(i)}:${u(a)}` : null;
|
|
1268
|
+
}
|
|
1269
|
+
var x = [
|
|
1270
|
+
"none",
|
|
1271
|
+
"day",
|
|
1272
|
+
"1d",
|
|
1273
|
+
"2d",
|
|
1274
|
+
"1w"
|
|
1275
|
+
], S = [
|
|
1276
|
+
"none",
|
|
1277
|
+
"at",
|
|
1278
|
+
"5m",
|
|
1279
|
+
"10m",
|
|
1280
|
+
"15m",
|
|
1281
|
+
"30m",
|
|
1282
|
+
"1h",
|
|
1283
|
+
"2h",
|
|
1284
|
+
"1d",
|
|
1285
|
+
"2d"
|
|
1286
|
+
], C = {
|
|
1287
|
+
at: 0,
|
|
1288
|
+
day: 0,
|
|
1289
|
+
"5m": 5,
|
|
1290
|
+
"10m": 10,
|
|
1291
|
+
"15m": 15,
|
|
1292
|
+
"30m": 30,
|
|
1293
|
+
"1h": 60,
|
|
1294
|
+
"2h": 120,
|
|
1295
|
+
"1d": 1440,
|
|
1296
|
+
"2d": 2880,
|
|
1297
|
+
"1w": 10080
|
|
1298
|
+
};
|
|
1299
|
+
function w(e) {
|
|
1300
|
+
if (!e.remind || e.remind === "none" || !(e.remind in C)) return null;
|
|
1301
|
+
let t = p(e.start);
|
|
1302
|
+
if (!t) return null;
|
|
1303
|
+
let [n, r] = (e.time ?? "09:00").split(":").map(Number);
|
|
1304
|
+
return t.setHours(n ?? 9, r ?? 0, 0, 0), /* @__PURE__ */ new Date(t.getTime() - C[e.remind] * 6e4);
|
|
1305
|
+
}
|
|
1306
|
+
export { t as _, _ as a, e as b, v as c, w as d, s as f, a as g, o as h, h as i, p as l, l as m, x as n, g as o, c as p, S as r, f as s, d as t, b as u, r as v, n as x, i as y };
|
|
1307
|
+
|
|
1308
|
+
//# sourceMappingURL=date-utils-DW99lT2W.js.map
|