@xiaolan-office/workbench-docs 0.1.12

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 (32) hide show
  1. package/dist/assets/fonts/Caladea-Bold.ttf +0 -0
  2. package/dist/assets/fonts/Caladea-BoldItalic.ttf +0 -0
  3. package/dist/assets/fonts/Caladea-Italic.ttf +0 -0
  4. package/dist/assets/fonts/Caladea-Regular.ttf +0 -0
  5. package/dist/assets/fonts/Carlito-Bold.ttf +0 -0
  6. package/dist/assets/fonts/Carlito-BoldItalic.ttf +0 -0
  7. package/dist/assets/fonts/Carlito-Italic.ttf +0 -0
  8. package/dist/assets/fonts/Carlito-Regular.ttf +0 -0
  9. package/dist/assets/fonts/GenOfficeSansKR-Regular-subset.woff2 +0 -0
  10. package/dist/assets/fonts/GenOfficeSerifKR-Regular-subset.woff2 +0 -0
  11. package/dist/assets/fonts/LiberationMono-Bold.ttf +0 -0
  12. package/dist/assets/fonts/LiberationMono-BoldItalic.ttf +0 -0
  13. package/dist/assets/fonts/LiberationMono-Italic.ttf +0 -0
  14. package/dist/assets/fonts/LiberationMono-Regular.ttf +0 -0
  15. package/dist/assets/fonts/LiberationSans-Bold.ttf +0 -0
  16. package/dist/assets/fonts/LiberationSans-BoldItalic.ttf +0 -0
  17. package/dist/assets/fonts/LiberationSans-Italic.ttf +0 -0
  18. package/dist/assets/fonts/LiberationSans-Regular.ttf +0 -0
  19. package/dist/assets/fonts/LiberationSerif-Bold.ttf +0 -0
  20. package/dist/assets/fonts/LiberationSerif-BoldItalic.ttf +0 -0
  21. package/dist/assets/fonts/LiberationSerif-Italic.ttf +0 -0
  22. package/dist/assets/fonts/LiberationSerif-Regular.ttf +0 -0
  23. package/dist/assets/fonts/NotoNaskhArabic-Regular-subset.woff2 +0 -0
  24. package/dist/assets/fonts/NotoSansArabic-Regular-subset.woff2 +0 -0
  25. package/dist/assets/fonts/NotoSansCJKsc-Regular-subset.woff2 +0 -0
  26. package/dist/assets/fonts/NotoSerifCJKsc-Regular-subset.woff2 +0 -0
  27. package/dist/fonts.css +459 -0
  28. package/dist/index.d.ts +54 -0
  29. package/dist/index.js +108990 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/style.css +1 -0
  32. package/package.json +25 -0
package/dist/fonts.css ADDED
@@ -0,0 +1,459 @@
1
+ /*
2
+ * Metric-compatible fallback fonts (bundled from LibreOffice, SIL OFL 1.1):
3
+ * Carlito ↔ Calibri, Caladea ↔ Cambria, Liberation Serif/Sans/Mono ↔
4
+ * Times New Roman/Arial/Courier New.
5
+ * When a Word font the document declares is missing locally, the browser's
6
+ * silent fallback (Helvetica etc.) changes character widths → line breaks and
7
+ * pagination all shift. With metric-compatible fallbacks, canvas line breaking
8
+ * reproduces the original document's layout and shares its font source with
9
+ * the offline pagination model (lo-fonts measures the same set of files).
10
+ */
11
+
12
+ /* "Carlito GO": Carlito with Vietnamese stacked diacritics fixed at build time
13
+ (tools/patch-carlito-vi.py); renamed per OFL Reserved Font Name clause */
14
+ @font-face {
15
+ font-family: 'Carlito GO';
16
+ src: url('./assets/fonts/Carlito-Regular.ttf');
17
+ font-weight: normal;
18
+ font-style: normal;
19
+ }
20
+ @font-face {
21
+ font-family: 'Carlito GO';
22
+ src: url('./assets/fonts/Carlito-Bold.ttf');
23
+ font-weight: bold;
24
+ font-style: normal;
25
+ }
26
+ @font-face {
27
+ font-family: 'Carlito GO';
28
+ src: url('./assets/fonts/Carlito-Italic.ttf');
29
+ font-weight: normal;
30
+ font-style: italic;
31
+ }
32
+ @font-face {
33
+ font-family: 'Carlito GO';
34
+ src: url('./assets/fonts/Carlito-BoldItalic.ttf');
35
+ font-weight: bold;
36
+ font-style: italic;
37
+ }
38
+
39
+ @font-face {
40
+ font-family: 'Caladea';
41
+ src: url('./assets/fonts/Caladea-Regular.ttf');
42
+ font-weight: normal;
43
+ font-style: normal;
44
+ }
45
+ @font-face {
46
+ font-family: 'Caladea';
47
+ src: url('./assets/fonts/Caladea-Bold.ttf');
48
+ font-weight: bold;
49
+ font-style: normal;
50
+ }
51
+ @font-face {
52
+ font-family: 'Caladea';
53
+ src: url('./assets/fonts/Caladea-Italic.ttf');
54
+ font-weight: normal;
55
+ font-style: italic;
56
+ }
57
+ @font-face {
58
+ font-family: 'Caladea';
59
+ src: url('./assets/fonts/Caladea-BoldItalic.ttf');
60
+ font-weight: bold;
61
+ font-style: italic;
62
+ }
63
+
64
+ @font-face {
65
+ font-family: 'Liberation Serif';
66
+ src: url('./assets/fonts/LiberationSerif-Regular.ttf');
67
+ font-weight: normal;
68
+ font-style: normal;
69
+ }
70
+ @font-face {
71
+ font-family: 'Liberation Serif';
72
+ src: url('./assets/fonts/LiberationSerif-Bold.ttf');
73
+ font-weight: bold;
74
+ font-style: normal;
75
+ }
76
+ @font-face {
77
+ font-family: 'Liberation Serif';
78
+ src: url('./assets/fonts/LiberationSerif-Italic.ttf');
79
+ font-weight: normal;
80
+ font-style: italic;
81
+ }
82
+ @font-face {
83
+ font-family: 'Liberation Serif';
84
+ src: url('./assets/fonts/LiberationSerif-BoldItalic.ttf');
85
+ font-weight: bold;
86
+ font-style: italic;
87
+ }
88
+
89
+ @font-face {
90
+ font-family: 'Liberation Sans';
91
+ src: url('./assets/fonts/LiberationSans-Regular.ttf');
92
+ font-weight: normal;
93
+ font-style: normal;
94
+ }
95
+ @font-face {
96
+ font-family: 'Liberation Sans';
97
+ src: url('./assets/fonts/LiberationSans-Bold.ttf');
98
+ font-weight: bold;
99
+ font-style: normal;
100
+ }
101
+ @font-face {
102
+ font-family: 'Liberation Sans';
103
+ src: url('./assets/fonts/LiberationSans-Italic.ttf');
104
+ font-weight: normal;
105
+ font-style: italic;
106
+ }
107
+ @font-face {
108
+ font-family: 'Liberation Sans';
109
+ src: url('./assets/fonts/LiberationSans-BoldItalic.ttf');
110
+ font-weight: bold;
111
+ font-style: italic;
112
+ }
113
+
114
+ @font-face {
115
+ font-family: 'Liberation Mono';
116
+ src: url('./assets/fonts/LiberationMono-Regular.ttf');
117
+ font-weight: normal;
118
+ font-style: normal;
119
+ }
120
+ @font-face {
121
+ font-family: 'Liberation Mono';
122
+ src: url('./assets/fonts/LiberationMono-Bold.ttf');
123
+ font-weight: bold;
124
+ font-style: normal;
125
+ }
126
+ @font-face {
127
+ font-family: 'Liberation Mono';
128
+ src: url('./assets/fonts/LiberationMono-Italic.ttf');
129
+ font-weight: normal;
130
+ font-style: italic;
131
+ }
132
+ @font-face {
133
+ font-family: 'Liberation Mono';
134
+ src: url('./assets/fonts/LiberationMono-BoldItalic.ttf');
135
+ font-weight: bold;
136
+ font-style: italic;
137
+ }
138
+
139
+ /*
140
+ * CJK fallback (Noto Sans/Serif CJK SC, SIL OFL): environments with no Chinese
141
+ * fonts at all (e.g. stripped-down Windows/Linux packages) no longer show tofu
142
+ * boxes. GB2312 subset (7445 common characters + CJK punctuation/fullwidth
143
+ * forms); rare characters still use system fallback. Bold is synthesized by the browser.
144
+ */
145
+ @font-face {
146
+ font-family: 'Noto Sans CJK SC';
147
+ src: url('./assets/fonts/NotoSansCJKsc-Regular-subset.woff2') format('woff2');
148
+ font-weight: normal;
149
+ font-style: normal;
150
+ }
151
+ @font-face {
152
+ font-family: 'Noto Serif CJK SC';
153
+ src: url('./assets/fonts/NotoSerifCJKsc-Regular-subset.woff2') format('woff2');
154
+ font-weight: normal;
155
+ font-style: normal;
156
+ }
157
+
158
+ /*
159
+ * Korean fallback: Noto Sans/Serif CJK KR subsets (KS X 1001 syllables + jamo),
160
+ * renamed per OFL since advances are normalized to the Windows faces Word
161
+ * substitutes (Batang/Malgun): hangul 1.0em; serif digits/space match Batang;
162
+ * sans Basic Latin matches Malgun (tools/normalize-kr-sans-hmtx.py).
163
+ */
164
+ @font-face {
165
+ font-family: 'GenOffice Sans KR';
166
+ src: url('./assets/fonts/GenOfficeSansKR-Regular-subset.woff2') format('woff2');
167
+ font-weight: normal;
168
+ font-style: normal;
169
+ }
170
+ @font-face {
171
+ font-family: 'GenOffice Serif KR';
172
+ src: url('./assets/fonts/GenOfficeSerifKR-Regular-subset.woff2') format('woff2');
173
+ font-weight: normal;
174
+ font-style: normal;
175
+ }
176
+
177
+ /* Missing KR font names (Noto/Source Han KR variants): Word keeps hangul on
178
+ * Batang but renders Latin/digits with the theme Latin face (M3 probe sample
179
+ * 13: Batang-metric Latin measures 1.13–1.19× Cambria/Calibri). Claims
180
+ * printable ASCII only — U+0020 stays on the Batang-normalized KR subsets so
181
+ * hangul word spacing is untouched. Serif class only: the missing-KR chain is
182
+ * always Batang-ward (cssFontFamily). */
183
+ @font-face {
184
+ font-family: 'KR Theme Latin GO';
185
+ src: local('Cambria'), url('./assets/fonts/Caladea-Regular.ttf');
186
+ unicode-range: U+0021-007E;
187
+ font-weight: normal;
188
+ font-style: normal;
189
+ }
190
+
191
+ /*
192
+ * Arabic fallback: unmodified Noto Naskh/Sans Arabic subsets (Arabic blocks +
193
+ * presentation forms + digits/punctuation). Without them, missing Arabic fonts
194
+ * fall through to the CJK/generic tail and Chromium picks a Geeza Pro-style UI
195
+ * face — larger and heavier than the naskh serif Word substitutes.
196
+ */
197
+ @font-face {
198
+ font-family: 'Noto Naskh Arabic';
199
+ src: url('./assets/fonts/NotoNaskhArabic-Regular-subset.woff2') format('woff2');
200
+ font-weight: normal;
201
+ font-style: normal;
202
+ }
203
+ @font-face {
204
+ font-family: 'Noto Sans Arabic';
205
+ src: url('./assets/fonts/NotoSansArabic-Regular-subset.woff2') format('woff2');
206
+ font-weight: normal;
207
+ font-style: normal;
208
+ }
209
+ /* Stand-in for Traditional/Simplified Arabic (compact Windows naskh faces):
210
+ * unscaled Noto Naskh substitution wraps ~10% earlier than Word (measured
211
+ * 11 lines vs 10 on regression sample 15), so pagination drifts. 90%
212
+ * (~1/1.10) is calibrated from that screenshot regression; canvas
213
+ * measureText resolves the same @font-face, so metrics follow automatically. */
214
+ @font-face {
215
+ font-family: 'Noto Naskh Arabic TA';
216
+ src: url('./assets/fonts/NotoNaskhArabic-Regular-subset.woff2') format('woff2');
217
+ size-adjust: 90%;
218
+ font-weight: normal;
219
+ font-style: normal;
220
+ }
221
+ /* Documents declaring Noto Naskh/Sans Arabic by name resolve to the bundled
222
+ * subsets, which run ~13% wider than Word's rendering of those faces; kept
223
+ * separate from the 90% TA alias (different calibration source). */
224
+ @font-face {
225
+ font-family: 'Noto Naskh Arabic W';
226
+ src: url('./assets/fonts/NotoNaskhArabic-Regular-subset.woff2') format('woff2');
227
+ size-adjust: 87%;
228
+ font-weight: normal;
229
+ font-style: normal;
230
+ }
231
+ @font-face {
232
+ font-family: 'Noto Sans Arabic W';
233
+ src: url('./assets/fonts/NotoSansArabic-Regular-subset.woff2') format('woff2');
234
+ size-adjust: 87%;
235
+ font-weight: normal;
236
+ font-style: normal;
237
+ }
238
+ /* Missing Arabic serif names (incl. Persian B/XB/IR faces) substitute wholesale
239
+ * to Times New Roman in Word; the bundled Naskh subset shapes 1.125× (Arabic) /
240
+ * 1.074× (Persian) wider than Times (M3 probe 2026-08-14, whole-sentence shaped
241
+ * R). 90% splits the difference; same value as the TA alias above but from a
242
+ * different calibration source, so they stay separate (like the W alias). */
243
+ @font-face {
244
+ font-family: 'Noto Naskh Arabic TNR';
245
+ src: url('./assets/fonts/NotoNaskhArabic-Regular-subset.woff2') format('woff2');
246
+ size-adjust: 90%;
247
+ font-weight: normal;
248
+ font-style: normal;
249
+ }
250
+ /* Arabic-Indic digits already run narrower than Times' (R≈0.855, same probe);
251
+ * scaling them another 10% would overshoot, so they stay unscaled ahead of the
252
+ * TNR alias in the missing-serif chain. */
253
+ @font-face {
254
+ font-family: 'Naskh Digits GO';
255
+ src: url('./assets/fonts/NotoNaskhArabic-Regular-subset.woff2') format('woff2');
256
+ unicode-range: U+0660-0669, U+06F0-06F9;
257
+ font-weight: normal;
258
+ font-style: normal;
259
+ }
260
+ /* cs runs with a missing naskh font route ASCII punctuation/digits to the
261
+ * substituted Times shapes (Word renders them there after wholesale TNR
262
+ * substitution; the Naskh subset's forms sit sunken on the Arabic baseline).
263
+ * Only non-letter ASCII is claimed, so Latin letters keep resolving in the
264
+ * run's ascii slot and Arabic in the Naskh subset behind this alias.
265
+ * local() needs the PostScript name in Chromium; the bundled Liberation file
266
+ * backstops hosts without a system Times. */
267
+ @font-face {
268
+ font-family: 'Times Punct GO';
269
+ src: local('TimesNewRomanPSMT'), local('Times New Roman'), url('./assets/fonts/LiberationSerif-Regular.ttf');
270
+ unicode-range: U+0020-0040, U+005B-0060, U+007B-007E;
271
+ font-weight: normal;
272
+ font-style: normal;
273
+ }
274
+
275
+ /* macOS's PMingLiU stand-in (Songti TC) draws these fullwidth glyphs at
276
+ * ~0.2-0.5em of ink inside the 1em advance — U+FF0F looks like a spaced
277
+ * half-width slash. Serve them from the bundled Noto subset (ink matches
278
+ * PMingLiU); real PMingLiU still precedes this face in the TC serif chain. */
279
+ @font-face {
280
+ font-family: 'GenOffice Fullwidth TC';
281
+ src: url('./assets/fonts/NotoSerifCJKsc-Regular-subset.woff2') format('woff2');
282
+ unicode-range: U+FF0D, U+FF0F, U+FF3C, U+FF3F, U+FF5E;
283
+ font-weight: normal;
284
+ font-style: normal;
285
+ }
286
+
287
+ /* macOS Chromium refuses to synthesize bold for 'Songti SC' requested by family
288
+ * name at weight 600/700 (only 900 selects Black). This local() alias, registered
289
+ * at weight normal only, forces Blink to synthesize bold at >=600. On Windows the
290
+ * local() sources don't resolve and the chain falls through to SimSun. */
291
+ @font-face {
292
+ font-family: 'GenOffice Songti SC';
293
+ src: local('STSongti-SC-Regular'), local('Songti SC Regular');
294
+ font-weight: normal;
295
+ font-style: normal;
296
+ }
297
+
298
+ /* East Asian system faces used as chain fallbacks (Hiragino Sans/Mincho,
299
+ * MS Mincho/Gothic, AppleMyungjo, Batang, Heiti TC, (P)MingLiU) draw Cyrillic
300
+ * and Greek as JIS fullwidth glyphs (Т measures 1em), exploding advances in
301
+ * Russian/Mongolian text that falls through a CJK chain. These local() aliases
302
+ * expose only the CJK ranges; other scripts continue down the chain to
303
+ * proportional faces. Registered weight-normal (bold synthesized, like
304
+ * 'GenOffice Songti SC') except Hiragino, which has real W6 faces. */
305
+ @font-face {
306
+ font-family: 'GenOffice Hiragino Sans';
307
+ src: local('Hiragino Sans'), local('HiraginoSans-W3'), local('MS Gothic');
308
+ unicode-range:
309
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
310
+ U+FF00-FFEF, U+20000-2FA1F;
311
+ font-weight: normal;
312
+ font-style: normal;
313
+ }
314
+ @font-face {
315
+ font-family: 'GenOffice Hiragino Sans';
316
+ src: local('HiraginoSans-W6'), local('Hiragino Sans W6');
317
+ unicode-range:
318
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
319
+ U+FF00-FFEF, U+20000-2FA1F;
320
+ font-weight: bold;
321
+ font-style: normal;
322
+ }
323
+ @font-face {
324
+ font-family: 'GenOffice Hiragino Mincho';
325
+ src: local('Hiragino Mincho ProN'), local('HiraMinProN-W3');
326
+ unicode-range:
327
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
328
+ U+FF00-FFEF, U+20000-2FA1F;
329
+ font-weight: normal;
330
+ font-style: normal;
331
+ }
332
+ @font-face {
333
+ font-family: 'GenOffice Hiragino Mincho';
334
+ src: local('HiraMinProN-W6'), local('Hiragino Mincho ProN W6');
335
+ unicode-range:
336
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
337
+ U+FF00-FFEF, U+20000-2FA1F;
338
+ font-weight: bold;
339
+ font-style: normal;
340
+ }
341
+ @font-face {
342
+ font-family: 'GenOffice MS Mincho';
343
+ src: local('MS Mincho'), local('MS PMincho');
344
+ unicode-range:
345
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
346
+ U+FF00-FFEF, U+20000-2FA1F;
347
+ font-weight: normal;
348
+ font-style: normal;
349
+ }
350
+ @font-face {
351
+ font-family: 'GenOffice Batang';
352
+ src: local('Batang'), local('BatangChe');
353
+ unicode-range:
354
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
355
+ U+FF00-FFEF, U+20000-2FA1F;
356
+ font-weight: normal;
357
+ font-style: normal;
358
+ }
359
+ @font-face {
360
+ font-family: 'GenOffice Myungjo';
361
+ src: local('AppleMyungjo');
362
+ unicode-range:
363
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
364
+ U+FF00-FFEF, U+20000-2FA1F;
365
+ font-weight: normal;
366
+ font-style: normal;
367
+ }
368
+ @font-face {
369
+ font-family: 'GenOffice Heiti TC';
370
+ src: local('Heiti TC'), local('Heiti TC Light'), local('STHeitiTC-Light');
371
+ unicode-range:
372
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
373
+ U+FF00-FFEF, U+20000-2FA1F;
374
+ font-weight: normal;
375
+ font-style: normal;
376
+ }
377
+ @font-face {
378
+ font-family: 'GenOffice MingLiU';
379
+ src: local('PMingLiU'), local('MingLiU');
380
+ unicode-range:
381
+ U+2E80-303F, U+3041-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7A3, U+F900-FAFF, U+FE30-FE4F,
382
+ U+FF00-FFEF, U+20000-2FA1F;
383
+ font-weight: normal;
384
+ font-style: normal;
385
+ }
386
+
387
+ /* Ethiopic faces (Nyala/Ebrima/Abyssinica) are missing on macOS and fall back
388
+ * to Kefa, 1.35-1.4x wider than Word's Nyala. Only routed when an Ethiopic
389
+ * face is declared, so no unicode-range needed; on Windows the declared name
390
+ * itself resolves ahead of this alias. */
391
+ @font-face {
392
+ font-family: 'GenOffice Ethiopic';
393
+ /* Chromium local() matches PostScript/full names, not family names */
394
+ src: local('Kefa-Regular'), local('Kefa Regular'), local('Kefa');
395
+ /* verified on regression sample 39: line breaks match Word at 72%; the
396
+ residual page-4 spill is line-height, not width */
397
+ size-adjust: 72%;
398
+ font-weight: normal;
399
+ font-style: normal;
400
+ }
401
+
402
+ /* Caladea has no box-drawing glyphs, so U+2500 separator rules fall to the CJK
403
+ * subset at 1em fullwidth and an 80-char rule overflows the column (Word draws
404
+ * it ~0.65em on a single line). Menlo/Consolas keep them ~0.6em. */
405
+ @font-face {
406
+ font-family: 'GenOffice Box Drawing';
407
+ /* Chromium local() matches PostScript/full names, not family names */
408
+ src: local('Menlo-Regular'), local('Menlo Regular'), local('Menlo'), local('Consolas');
409
+ unicode-range: U+2500-257F;
410
+ font-weight: normal;
411
+ font-style: normal;
412
+ }
413
+
414
+ /* Superscript/subscript digits are outside the KR subsets and would fall
415
+ * through to AppleMyungjo, whose U+2082 is a full-width (1.0em) glyph —
416
+ * "Cu₂O" rendered as "Cu₂ O". Serve them from bundled latin faces instead. */
417
+ @font-face {
418
+ font-family: 'GenOffice Sans KR';
419
+ src: url('./assets/fonts/Carlito-Regular.ttf') format('truetype');
420
+ unicode-range: U+2070-209F, U+00B2-00B3, U+00B9;
421
+ font-weight: normal;
422
+ font-style: normal;
423
+ }
424
+ @font-face {
425
+ font-family: 'GenOffice Serif KR';
426
+ /* Carlito, not Caladea/LiberationSerif: only Carlito covers the whole block */
427
+ src: url('./assets/fonts/Carlito-Regular.ttf') format('truetype');
428
+ unicode-range: U+2070-209F, U+00B2-00B3, U+00B9;
429
+ font-weight: normal;
430
+ font-style: normal;
431
+ }
432
+
433
+ /* Same for the Cambria→Caladea chain and the CJK SC subsets: none covers the
434
+ * sub/superscript block, so BaSO₄ falls to a system symbol font (small, dark
435
+ * glyphs). Ranges list only codepoints the substitute face actually has (and
436
+ * skip glyphs the base face covers itself, e.g. Caladea's ²³¹ⁿ), so everything
437
+ * else keeps today's fallback. Liberation Serif for the serif faces (style
438
+ * match), Carlito for the sans one. Normal weight only, like the KR fix. */
439
+ @font-face {
440
+ font-family: 'Caladea';
441
+ src: url('./assets/fonts/LiberationSerif-Regular.ttf') format('truetype');
442
+ unicode-range: U+2074-2079, U+2080-2094;
443
+ font-weight: normal;
444
+ font-style: normal;
445
+ }
446
+ @font-face {
447
+ font-family: 'Noto Serif CJK SC';
448
+ src: url('./assets/fonts/LiberationSerif-Regular.ttf') format('truetype');
449
+ unicode-range: U+2074-2079, U+207F, U+2080-2094;
450
+ font-weight: normal;
451
+ font-style: normal;
452
+ }
453
+ @font-face {
454
+ font-family: 'Noto Sans CJK SC';
455
+ src: url('./assets/fonts/Carlito-Regular.ttf') format('truetype');
456
+ unicode-range: U+2070-2071, U+2074-2094;
457
+ font-weight: normal;
458
+ font-style: normal;
459
+ }
@@ -0,0 +1,54 @@
1
+ export interface DocsWorkbenchSaveRequest {
2
+ data: ArrayBuffer
3
+ expectedVersion?: string | number
4
+ }
5
+
6
+ export interface DocsWorkbenchSaveResult {
7
+ version?: string | number
8
+ }
9
+
10
+ export interface DocsWorkbenchOptions {
11
+ container: HTMLElement
12
+ data: ArrayBuffer | Uint8Array
13
+ fileName: string
14
+ editable?: boolean
15
+ version?: string | number
16
+ userName?: string
17
+ lang?: 'zh' | 'en' | 'ja' | 'ko' | 'fr' | 'de' | 'es' | 'th' | 'id' | 'ru' | 'ar'
18
+ theme?: 'light' | 'dark' | 'system'
19
+ save?: (request: DocsWorkbenchSaveRequest) => Promise<DocsWorkbenchSaveResult>
20
+ onDirtyChange?: (dirty: boolean) => void
21
+ onError?: (error: Error) => void
22
+ fontCssUrl?: string
23
+ }
24
+
25
+ export interface DocsWorkbenchRevisionRequest {
26
+ bookmarkId: string
27
+ issueId: string
28
+ replacementText: string
29
+ author?: string
30
+ commentText?: string
31
+ }
32
+
33
+ export interface DocsWorkbenchRevisionResult {
34
+ originalText: string
35
+ replacementText: string
36
+ }
37
+
38
+ export declare class DocsWorkbench {
39
+ constructor(options: DocsWorkbenchOptions)
40
+ mount(): Promise<void>
41
+ locateBookmark(bookmarkId: string): void
42
+ applyRevision(request: DocsWorkbenchRevisionRequest): Promise<DocsWorkbenchRevisionResult>
43
+ resolveRevision(
44
+ issueId: string,
45
+ mode: 'accept' | 'reject',
46
+ author?: string,
47
+ options?: { bookmarkId?: string; originalText?: string },
48
+ ): Promise<void>
49
+ save(): Promise<boolean>
50
+ getStatus(): string
51
+ dispose(): Promise<void>
52
+ }
53
+
54
+ export declare function mountDocsWorkbench(options: DocsWorkbenchOptions): Promise<DocsWorkbench>