@univerjs/ui 0.12.3 → 0.12.4

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 (64) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +9 -9
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +1 -1
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/ja-JP.js +1 -1
  9. package/lib/cjs/locale/ko-KR.js +1 -1
  10. package/lib/cjs/locale/ru-RU.js +1 -1
  11. package/lib/cjs/locale/vi-VN.js +1 -1
  12. package/lib/cjs/locale/zh-CN.js +1 -1
  13. package/lib/cjs/locale/zh-TW.js +1 -1
  14. package/lib/es/facade.js +44 -35
  15. package/lib/es/index.js +3065 -2936
  16. package/lib/es/locale/ca-ES.js +14 -16
  17. package/lib/es/locale/en-US.js +14 -16
  18. package/lib/es/locale/es-ES.js +14 -16
  19. package/lib/es/locale/fa-IR.js +16 -18
  20. package/lib/es/locale/fr-FR.js +14 -16
  21. package/lib/es/locale/ja-JP.js +16 -18
  22. package/lib/es/locale/ko-KR.js +16 -18
  23. package/lib/es/locale/ru-RU.js +16 -18
  24. package/lib/es/locale/vi-VN.js +14 -16
  25. package/lib/es/locale/zh-CN.js +14 -16
  26. package/lib/es/locale/zh-TW.js +14 -16
  27. package/lib/facade.js +44 -35
  28. package/lib/index.css +1 -1
  29. package/lib/index.js +3065 -2936
  30. package/lib/locale/ca-ES.js +14 -16
  31. package/lib/locale/en-US.js +14 -16
  32. package/lib/locale/es-ES.js +14 -16
  33. package/lib/locale/fa-IR.js +16 -18
  34. package/lib/locale/fr-FR.js +14 -16
  35. package/lib/locale/ja-JP.js +16 -18
  36. package/lib/locale/ko-KR.js +16 -18
  37. package/lib/locale/ru-RU.js +16 -18
  38. package/lib/locale/vi-VN.js +14 -16
  39. package/lib/locale/zh-CN.js +14 -16
  40. package/lib/locale/zh-TW.js +14 -16
  41. package/lib/types/components/font-family/FontFamilyItem.d.ts +19 -2
  42. package/lib/types/components/font-family/index.d.ts +0 -1
  43. package/lib/types/components/font-family/interface.d.ts +0 -6
  44. package/lib/types/controllers/config.schema.d.ts +5 -0
  45. package/lib/types/controllers/ui/ui.controller.d.ts +8 -15
  46. package/lib/types/facade/f-univer.d.ts +22 -1
  47. package/lib/types/index.d.ts +2 -1
  48. package/lib/types/locale/en-US.d.ts +14 -16
  49. package/lib/types/services/dom/canvas-dom-layer.service.d.ts +1 -0
  50. package/lib/types/services/font.service.d.ts +91 -0
  51. package/lib/umd/facade.js +1 -1
  52. package/lib/umd/index.js +9 -9
  53. package/lib/umd/locale/ca-ES.js +1 -1
  54. package/lib/umd/locale/en-US.js +1 -1
  55. package/lib/umd/locale/es-ES.js +1 -1
  56. package/lib/umd/locale/fa-IR.js +1 -1
  57. package/lib/umd/locale/fr-FR.js +1 -1
  58. package/lib/umd/locale/ja-JP.js +1 -1
  59. package/lib/umd/locale/ko-KR.js +1 -1
  60. package/lib/umd/locale/ru-RU.js +1 -1
  61. package/lib/umd/locale/vi-VN.js +1 -1
  62. package/lib/umd/locale/zh-CN.js +1 -1
  63. package/lib/umd/locale/zh-TW.js +1 -1
  64. package/package.json +8 -8
@@ -29,22 +29,20 @@ const e = {
29
29
  more: "Més"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "No s'ha trobat aquesta font al sistema, s'utilitza la font per defecte.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Dreceres"
@@ -29,22 +29,20 @@ const e = {
29
29
  more: "More"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "No such font found in the system, using default font.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Shortcuts"
@@ -29,22 +29,20 @@ const a = {
29
29
  more: "Más"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "No se encontró esta fuente en el sistema, se utiliza la fuente predeterminada.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Atajos"
@@ -1,4 +1,4 @@
1
- const i = {
1
+ const t = {
2
2
  toolbar: {
3
3
  heading: {
4
4
  normal: "متن عادی",
@@ -29,22 +29,20 @@ const i = {
29
29
  more: "بیشتر"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "هیچ فونتی با این نام در سیستم یافت نشد، از فونت پیش‌فرض استفاده می‌شود.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "کلیدهای میانبر"
@@ -83,5 +81,5 @@ const i = {
83
81
  }
84
82
  };
85
83
  export {
86
- i as default
84
+ t as default
87
85
  };
@@ -29,22 +29,20 @@ const e = {
29
29
  more: "Plus"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "Aucune police de ce type trouvée dans le système, utilisation de la police par défaut.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Raccourcis"
@@ -1,4 +1,4 @@
1
- const i = {
1
+ const t = {
2
2
  toolbar: {
3
3
  heading: {
4
4
  normal: "標準",
@@ -29,22 +29,20 @@ const i = {
29
29
  more: "もっと見る"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "システムにそのようなフォントが見つからないため、デフォルトのフォントを使用しています。",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "微軟雅黒",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "ショートカット"
@@ -83,5 +81,5 @@ const i = {
83
81
  }
84
82
  };
85
83
  export {
86
- i as default
84
+ t as default
87
85
  };
@@ -1,4 +1,4 @@
1
- const i = {
1
+ const t = {
2
2
  toolbar: {
3
3
  heading: {
4
4
  normal: "일반",
@@ -29,22 +29,20 @@ const i = {
29
29
  more: "더 보기"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "시스템에 해당 폰트가 없어 기본 폰트를 사용합니다.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "단축키"
@@ -83,5 +81,5 @@ const i = {
83
81
  }
84
82
  };
85
83
  export {
86
- i as default
84
+ t as default
87
85
  };
@@ -1,4 +1,4 @@
1
- const i = {
1
+ const t = {
2
2
  toolbar: {
3
3
  heading: {
4
4
  normal: "Обычный текст",
@@ -29,22 +29,20 @@ const i = {
29
29
  more: "Больше"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "В системе не найден такой шрифт, используется шрифт по умолчанию.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Сочетания клавиш"
@@ -83,5 +81,5 @@ const i = {
83
81
  }
84
82
  };
85
83
  export {
86
- i as default
84
+ t as default
87
85
  };
@@ -29,22 +29,20 @@ const t = {
29
29
  more: "Thêm"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "Microsoft YaHei",
37
- SimSun: "SimSun",
38
- SimHei: "SimHei",
39
- Kaiti: "Kaiti",
40
- FangSong: "FangSong",
41
- NSimSun: "NSimSun",
42
- STXinwei: "STXinwei",
43
- STXingkai: "STXingkai",
44
- STLiti: "STLiti",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "Không tìm thấy phông chữ này trong hệ thống, sử dụng phông chữ mặc định.",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "Microsoft YaHei",
38
+ simsun: "SimSun",
39
+ simhei: "SimHei",
40
+ kaiti: "Kaiti",
41
+ fangsong: "FangSong",
42
+ nsimsun: "NSimSun",
43
+ stxinwei: "STXinwei",
44
+ stxingkai: "STXingkai",
45
+ stliti: "STLiti"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "Bảng phím tắt"
@@ -29,22 +29,20 @@ const t = {
29
29
  more: "更多"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "微软雅黑",
37
- SimSun: "宋体",
38
- SimHei: "黑体",
39
- Kaiti: "楷体",
40
- FangSong: "仿宋",
41
- NSimSun: "新宋体",
42
- STXinwei: "华文新魏",
43
- STXingkai: "华文行楷",
44
- STLiti: "华文隶书",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "系统中未找到该字体,使用默认字体。",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "微软雅黑",
38
+ simsun: "宋体",
39
+ simhei: "黑体",
40
+ kaiti: "楷体",
41
+ fangsong: "仿宋",
42
+ nsimsun: "新宋体",
43
+ stxinwei: "华文新魏",
44
+ stxingkai: "华文行楷",
45
+ stliti: "华文隶书"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "快捷键面板"
@@ -29,22 +29,20 @@ const t = {
29
29
  more: "更多"
30
30
  },
31
31
  fontFamily: {
32
- TimesNewRoman: "Times New Roman",
33
- Arial: "Arial",
34
- Tahoma: "Tahoma",
35
- Verdana: "Verdana",
36
- MicrosoftYaHei: "微軟雅黑",
37
- SimSun: "宋體",
38
- SimHei: "黑體",
39
- Kaiti: "楷體",
40
- FangSong: "仿宋",
41
- NSimSun: "新宋體",
42
- STXinwei: "華文新魏",
43
- STXingkai: "華文行楷",
44
- STLiti: "華文隸書",
45
- HanaleiFill: "HanaleiFill",
46
- Anton: "Anton",
47
- Pacifico: "Pacifico"
32
+ "not-supported": "系統中未找到該字體,使用預設字體。",
33
+ arial: "Arial",
34
+ "times-new-roman": "Times New Roman",
35
+ tahoma: "Tahoma",
36
+ verdana: "Verdana",
37
+ "microsoft-yahei": "微軟雅黑",
38
+ simsun: "宋體",
39
+ simhei: "黑體",
40
+ kaiti: "楷體",
41
+ fangsong: "仿宋",
42
+ nsimsun: "新宋體",
43
+ stxinwei: "華文新魏",
44
+ stxingkai: "華文行楷",
45
+ stliti: "華文隸書"
48
46
  },
49
47
  "shortcut-panel": {
50
48
  title: "快捷鍵面板"
@@ -1,2 +1,19 @@
1
- import { IFontFamilyItemProps } from './interface';
2
- export declare const FontFamilyItem: (props: IFontFamilyItemProps) => import("react/jsx-runtime").JSX.Element;
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const FontFamilyItem: ({ id, value }: {
17
+ id: string;
18
+ value: string;
19
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -15,4 +15,3 @@
15
15
  */
16
16
  export { FontFamily } from './FontFamily';
17
17
  export { FontFamilyItem } from './FontFamilyItem';
18
- export { FONT_FAMILY_LIST } from './interface';
@@ -3,10 +3,4 @@ export interface IFontFamilyProps extends ICustomComponentProps<string> {
3
3
  value: string;
4
4
  }
5
5
  export declare const FONT_FAMILY_COMPONENT = "UI_FONT_FAMILY_COMPONENT";
6
- export interface IFontFamilyItemProps extends ICustomComponentProps<string> {
7
- value: string;
8
- }
9
6
  export declare const FONT_FAMILY_ITEM_COMPONENT = "UI_FONT_FAMILY_ITEM_COMPONENT";
10
- export declare const FONT_FAMILY_LIST: {
11
- value: string;
12
- }[];
@@ -1,4 +1,5 @@
1
1
  import { DependencyOverride } from '@univerjs/core';
2
+ import { IFontConfig } from '../services/font.service';
2
3
  import { MenuConfig } from '../services/menu/menu';
3
4
  import { IWorkbenchOptions } from './ui/ui.controller';
4
5
  export declare const UI_PLUGIN_CONFIG_KEY = "ui.config";
@@ -8,6 +9,10 @@ export interface IUniverUIConfig extends IWorkbenchOptions {
8
9
  disableAutoFocus?: true;
9
10
  override?: DependencyOverride;
10
11
  menu?: MenuConfig;
12
+ /**
13
+ * Custom font family list to be added to the font service.
14
+ */
15
+ customFontFamily?: IFontConfig[];
11
16
  popupRootId?: string;
12
17
  /**
13
18
  * The fallback avatar for user.
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Co., Ltd.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { IFontConfig } from '../../services/font.service';
16
2
  export type RibbonType = 'default' | 'simple' | 'classic';
17
3
  export interface IWorkbenchOptions {
18
4
  container?: string | HTMLElement;
@@ -24,7 +10,14 @@ export interface IWorkbenchOptions {
24
10
  * If Univer should make the toolbar bar visible.
25
11
  */
26
12
  toolbar?: boolean;
13
+ /**
14
+ * The type of ribbon to be used in the UI.
15
+ */
27
16
  ribbonType?: RibbonType;
17
+ /**
18
+ * Custom font family list to be added to the font service.
19
+ */
20
+ customFontFamily?: IFontConfig[];
28
21
  /**
29
22
  * If Univer should make the footer bar visible.
30
23
  */
@@ -1,6 +1,6 @@
1
1
  import { IDisposable } from '@univerjs/core';
2
2
  import { IMessageProps } from '@univerjs/design';
3
- import { BuiltInUIPart, ComponentType, IComponentOptions, IDialogPartMethodOptions, ISidebarMethodOptions, ComponentManager } from '@univerjs/ui';
3
+ import { BuiltInUIPart, ComponentType, IComponentOptions, IDialogPartMethodOptions, IFontConfig, ISidebarMethodOptions, ComponentManager } from '@univerjs/ui';
4
4
  import { IFacadeMenuItem, IFacadeSubmenuItem, FMenu, FSubmenu } from './f-menu-builder';
5
5
  import { FUniver } from '@univerjs/core/facade';
6
6
  import { FShortcut } from './f-shortcut';
@@ -383,6 +383,26 @@ export interface IFUniverUIMixin {
383
383
  * This will render `unit2` in the workbench's main area.
384
384
  */
385
385
  setCurrent(unitId: string): void;
386
+ /**
387
+ * Append custom fonts to the font list.
388
+ * @param fonts The array of font configurations to add.
389
+ * @example
390
+ * ```ts
391
+ * univerAPI.addFonts([
392
+ * {
393
+ * value: 'CustomFont1',
394
+ * label: 'Custom Font 1',
395
+ * category: 'sans-serif',
396
+ * },
397
+ * {
398
+ * value: 'CustomFont2',
399
+ * label: 'Custom Font 2',
400
+ * category: 'serif',
401
+ * },
402
+ * ]);
403
+ * ```
404
+ */
405
+ addFonts(fonts: IFontConfig[]): void;
386
406
  }
387
407
  /**
388
408
  * @ignore
@@ -404,6 +424,7 @@ export declare class FUniverUIMixin extends FUniver implements IFUniverUIMixin {
404
424
  registerUIPart(key: BuiltInUIPart, component: any): IDisposable;
405
425
  registerComponent(name: string, component: any, options?: IComponentOptions): IDisposable;
406
426
  setCurrent(unitId: string): void;
427
+ addFonts(fonts: IFontConfig[]): void;
407
428
  }
408
429
  declare module '@univerjs/core/facade' {
409
430
  interface FUniver extends IFUniverUIMixin {
@@ -22,7 +22,7 @@ export * from './components';
22
22
  export { COLOR_PICKER_COMPONENT } from './components/color-picker/interface';
23
23
  export { FontFamily } from './components/font-family/FontFamily';
24
24
  export { FontFamilyItem } from './components/font-family/FontFamilyItem';
25
- export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, FONT_FAMILY_LIST, type IFontFamilyItemProps, type IFontFamilyProps } from './components/font-family/interface';
25
+ export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, type IFontFamilyProps } from './components/font-family/interface';
26
26
  export { FontSize } from './components/font-size/FontSize';
27
27
  export { FONT_SIZE_COMPONENT, FONT_SIZE_LIST, HEADING_LIST } from './components/font-size/interface';
28
28
  export * from './components/hooks';
@@ -52,6 +52,7 @@ export { ContextMenuService, type IContextMenuHandler, IContextMenuService } fro
52
52
  export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
53
53
  export { IDialogService } from './services/dialog/dialog.service';
54
54
  export { CanvasFloatDomService, type IFloatDom, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
55
+ export { type IFontConfig, IFontService } from './services/font.service';
55
56
  export { DesktopGalleryService } from './services/gallery/desktop-gallery.service';
56
57
  export { IGalleryService } from './services/gallery/gallery.service';
57
58
  export { DesktopGlobalZoneService } from './services/global-zone/desktop-global-zone.service';