@officesdk/editor-sdk-core 0.0.0-alpha.9 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/cjs/docs/comments.js +3 -0
  2. package/cjs/docs/discuss.js +3 -0
  3. package/cjs/docs/index.js +1 -1
  4. package/cjs/docs/outline.js +3 -0
  5. package/cjs/docs/sdk.js +1 -1
  6. package/cjs/docs/sidebar.js +3 -0
  7. package/cjs/docs/theme.js +3 -0
  8. package/cjs/docx/sdk.js +1 -1
  9. package/cjs/docx/theme.js +1 -1
  10. package/cjs/form/sdk.js +1 -1
  11. package/cjs/form/ui.js +1 -1
  12. package/cjs/presentation/index.js +1 -1
  13. package/cjs/presentation/sdk.js +1 -1
  14. package/cjs/presentation/slide-theme.js +3 -0
  15. package/cjs/presentation/theme.js +1 -1
  16. package/cjs/shared/attachment.js +11 -1
  17. package/cjs/shared/editor.js +1 -1
  18. package/cjs/shared/file-picker.js +1 -1
  19. package/cjs/shared/fonts.js +16 -1
  20. package/cjs/shared/history.js +1 -1
  21. package/cjs/shared/http.js +1 -1
  22. package/cjs/shared/i18n.js +1 -1
  23. package/cjs/shared/index.js +4 -2
  24. package/cjs/shared/spell-check.js +3 -0
  25. package/cjs/shared/theme/components/dropdown.js +1 -1
  26. package/cjs/shared/theme/components/input.js +1 -1
  27. package/cjs/shared/theme/components/menu.js +1 -1
  28. package/cjs/shared/theme/components/slider.js +1 -1
  29. package/cjs/shared/theme/components/tab.js +1 -1
  30. package/cjs/shared/theme/components/toast.js +1 -1
  31. package/cjs/shared/theme/components/toolbar-button.js +1 -1
  32. package/cjs/shared/theme/components/tooltip.js +1 -1
  33. package/cjs/shared/theme/index.js +1 -1
  34. package/cjs/shared/toolbar.js +1 -1
  35. package/cjs/shared/version.js +1 -1
  36. package/cjs/sheet/form.js +1 -1
  37. package/cjs/sheet/history.js +1 -1
  38. package/cjs/sheet/index.js +1 -1
  39. package/cjs/sheet/render.js +1 -1
  40. package/cjs/sheet/sdk.js +1 -1
  41. package/cjs/sheet/sheet-tab.js +1 -1
  42. package/cjs/table/field.js +1 -1
  43. package/cjs/table/history.js +1 -1
  44. package/cjs/table/index.js +1 -1
  45. package/cjs/table/record.js +3 -0
  46. package/cjs/table/sdk.js +1 -1
  47. package/cjs/table/snapshot.js +1 -1
  48. package/cjs/table/view.js +1 -1
  49. package/esm/docs/comments.js +2 -0
  50. package/esm/docs/discuss.js +2 -0
  51. package/esm/docs/index.js +1 -1
  52. package/esm/docs/outline.js +2 -0
  53. package/esm/docs/sdk.js +1 -1
  54. package/esm/docs/sidebar.js +2 -0
  55. package/esm/docs/theme.js +2 -0
  56. package/esm/docx/sdk.js +1 -1
  57. package/esm/docx/theme.js +1 -1
  58. package/esm/form/sdk.js +1 -1
  59. package/esm/form/ui.js +1 -1
  60. package/esm/presentation/index.js +1 -1
  61. package/esm/presentation/sdk.js +1 -1
  62. package/esm/presentation/slide-theme.js +2 -0
  63. package/esm/presentation/theme.js +1 -1
  64. package/esm/shared/attachment.js +10 -2
  65. package/esm/shared/editor.js +1 -1
  66. package/esm/shared/file-picker.js +1 -1
  67. package/esm/shared/fonts.js +15 -2
  68. package/esm/shared/history.js +1 -1
  69. package/esm/shared/http.js +1 -1
  70. package/esm/shared/i18n.js +1 -1
  71. package/esm/shared/index.js +2 -1
  72. package/esm/shared/spell-check.js +2 -0
  73. package/esm/shared/theme/components/dropdown.js +1 -1
  74. package/esm/shared/theme/components/input.js +1 -1
  75. package/esm/shared/theme/components/menu.js +1 -1
  76. package/esm/shared/theme/components/slider.js +1 -1
  77. package/esm/shared/theme/components/tab.js +1 -1
  78. package/esm/shared/theme/components/toast.js +1 -1
  79. package/esm/shared/theme/components/toolbar-button.js +1 -1
  80. package/esm/shared/theme/components/tooltip.js +1 -1
  81. package/esm/shared/theme/index.js +1 -1
  82. package/esm/shared/toolbar.js +1 -1
  83. package/esm/shared/version.js +1 -1
  84. package/esm/sheet/form.js +1 -1
  85. package/esm/sheet/history.js +1 -1
  86. package/esm/sheet/index.js +1 -1
  87. package/esm/sheet/render.js +1 -1
  88. package/esm/sheet/sdk.js +1 -1
  89. package/esm/sheet/sheet-tab.js +1 -1
  90. package/esm/table/field.js +1 -1
  91. package/esm/table/history.js +1 -1
  92. package/esm/table/index.js +1 -1
  93. package/esm/table/record.js +2 -0
  94. package/esm/table/sdk.js +1 -1
  95. package/esm/table/snapshot.js +1 -1
  96. package/esm/table/view.js +1 -1
  97. package/package.json +1 -1
  98. package/types/combine.d.ts +817 -44
  99. package/types/diagram.d.ts +362 -11
  100. package/types/docs.d.ts +565 -12
  101. package/types/docx.d.ts +364 -13
  102. package/types/form.d.ts +371 -18
  103. package/types/mindmap.d.ts +362 -11
  104. package/types/pdf.d.ts +362 -11
  105. package/types/presentation.d.ts +441 -18
  106. package/types/shared.d.ts +362 -11
  107. package/types/sheet.d.ts +421 -34
  108. package/types/table.d.ts +474 -11
package/types/docx.d.ts CHANGED
@@ -54,6 +54,20 @@ export declare abstract class AbstractedDocxSDK extends EditorSDK {
54
54
  abstract get paragraphs(): DocxParagraphs;
55
55
  }
56
56
 
57
+ /**
58
+ * 编辑文件检查器
59
+ */
60
+ export declare abstract class AbstractedEditorFileChecker {
61
+ /**
62
+ * 检查文件是否符合限制
63
+ * @param files
64
+ * @returns 返回符合的files
65
+ */
66
+ check?: (files: EditorPickedFile[], options?: {
67
+ type: 'image' | 'video' | 'audio' | 'attachment';
68
+ }) => EditorPickedFile[];
69
+ }
70
+
57
71
  export declare abstract class AbstractedEditorFileUploader {
58
72
  /**
59
73
  * 开始上传
@@ -402,6 +416,8 @@ export declare interface CommonThemeConfig {
402
416
  checkbox: CheckboxConfig;
403
417
  /** 下拉框 */
404
418
  dropdown: DropdownConfig;
419
+ /** 下拉框按钮 */
420
+ dropdownButton: DropdownButtonConfig;
405
421
  /** 菜单 */
406
422
  menu: MenuConfig;
407
423
  /** 开关 */
@@ -976,7 +992,7 @@ export declare interface DocxSDKOptions extends EditorOptions {
976
992
  /**
977
993
  * 主题字体相关配置
978
994
  */
979
- theme: DocxThemeOptions;
995
+ theme?: DocxThemeOptions;
980
996
  /**
981
997
  * 工具栏设置
982
998
  */
@@ -1332,7 +1348,7 @@ export declare interface DocxThemeStyleConfigList {
1332
1348
  /**
1333
1349
  * 主题样式配置项
1334
1350
  */
1335
- export declare type DocxThemeStyleKeys = 'BackgroundColor' | 'WebViewBgColor' | 'RulerSize' | 'ScrollWidthInPx' | 'RulerNumber' | 'RulerOutlines' | 'RulerTickMark' | 'RulerMarkersOutline' | 'RulerActiveMarkersOutline' | 'RulerMarkersFill' | 'RulerLightClr' | 'RulerDarkClr' | 'BackgroundScroll' | 'ContentControlBackground' | 'ContentControlTagBackground' | 'ContentControlTagBorder' | 'ContentControllersBrd' | 'ContentControllersHover' | 'ContentControllersActive' | 'ContentControllersText' | 'ContentControllersTextActive' | 'ContentControllersSymbol' | 'ContentControllersSymbolActive' | 'ContentControllersAnchorActive' | 'PageSpace' | 'PageShadowOffsetX' | 'PageShadowOffsetY' | 'PageShadowSize' | 'PageShadowColor' | 'DocumentBottomSpace' | 'DocumentMargins' | 'ToastOffsetTop' | 'ShowTopShadow';
1351
+ export declare type DocxThemeStyleKeys = 'BackgroundColor' | 'WebViewBgColor' | 'RulerSize' | 'ScrollWidthInPx' | 'RulerNumber' | 'RulerOutlines' | 'RulerTickMark' | 'RulerMarkersOutline' | 'RulerActiveMarkersOutline' | 'RulerMarkersFill' | 'RulerLightClr' | 'RulerDarkClr' | 'BackgroundScroll' | 'ContentControlBackground' | 'ContentControlTagBackground' | 'ContentControlTagBorder' | 'ContentControllersBrd' | 'ContentControllersHover' | 'ContentControllersActive' | 'ContentControllersText' | 'ContentControllersTextActive' | 'ContentControllersSymbol' | 'ContentControllersSymbolActive' | 'ContentControllersAnchorActive' | 'PageSpace' | 'PageShadowOffsetX' | 'PageShadowOffsetY' | 'PageShadowSize' | 'PageShadowColor' | 'DocumentBottomSpace' | 'DocumentMargins' | 'ToastOffsetTop' | 'ShowTopShadow' | 'ToolbarBackgroundColor' | 'MenuBarBackgroundColor' | 'StatusBarBackgroundColor' | 'SideBarBackgroundColor';
1336
1352
 
1337
1353
  /**
1338
1354
  * 通用目录项条目
@@ -1818,6 +1834,10 @@ export declare interface DropdownButtonConfig {
1818
1834
  color: StateStyles;
1819
1835
  /** 背景 */
1820
1836
  background: StateStyles;
1837
+ /** 无边框背景 */
1838
+ frameLessBackground: StateStyles;
1839
+ /** 边框颜色 */
1840
+ borderColor: StateStyles;
1821
1841
  /** 图标 */
1822
1842
  icon: {
1823
1843
  size: IconSize;
@@ -1837,6 +1857,8 @@ export declare interface DropdownButtonConfig {
1837
1857
  large: DropdownButtonSizeStyles;
1838
1858
  /** 中尺寸 */
1839
1859
  medium: DropdownButtonSizeStyles;
1860
+ /** 小尺寸 */
1861
+ small: DropdownButtonSizeStyles;
1840
1862
  };
1841
1863
  }
1842
1864
 
@@ -1846,6 +1868,7 @@ export declare interface DropdownButtonSizeStyles {
1846
1868
  fontSize: string;
1847
1869
  height: string;
1848
1870
  gap: string;
1871
+ borderRadius: string;
1849
1872
  iconSize: IconSize;
1850
1873
  indicatorSize: IconSize;
1851
1874
  }
@@ -2082,6 +2105,10 @@ export declare interface EditorAttachmentOptions {
2082
2105
  * 附件选择器
2083
2106
  */
2084
2107
  picker?: EditorFilePicker;
2108
+ /**
2109
+ * 文件检查器
2110
+ */
2111
+ checker?: AbstractedEditorFileChecker;
2085
2112
  /**
2086
2113
  * 附件上传器
2087
2114
  */
@@ -2514,6 +2541,14 @@ export declare type EditorContextMenuOptions<TName extends string> = EditorMenuO
2514
2541
  */
2515
2542
  export declare type EditorCopyOptions = EditorLogicFeatureConfig;
2516
2543
 
2544
+ /**
2545
+ * 日期格式
2546
+ * - `YYYY/MM/DD` 年/月/日(简繁中文、韩语、日语默认)
2547
+ * - `MM/DD/YYYY` 月/日/年(英语默认)
2548
+ * - `DD/MM/YYYY` 日/月/年(其他语言默认)
2549
+ */
2550
+ export declare type EditorDateFormat = 'YYYY/MM/DD' | 'MM/DD/YYYY' | 'DD/MM/YYYY';
2551
+
2517
2552
  /**
2518
2553
  * 编辑器解密选项接口
2519
2554
  * 用于配置编辑器中需要解密的内容的相关选项
@@ -2691,11 +2726,31 @@ export declare interface EditorFilePicker {
2691
2726
  }
2692
2727
 
2693
2728
  export declare interface EditorFilePickerOpenOptions {
2729
+ /**
2730
+ * 文件类型限制
2731
+ */
2694
2732
  mimeTypes?: string[];
2733
+ /**
2734
+ * 最大文件尺寸限制
2735
+ */
2695
2736
  maxSize?: number;
2737
+ /**
2738
+ * 文件后缀限制
2739
+ */
2696
2740
  extensions?: string[];
2741
+ /**
2742
+ * 是否支持多选
2743
+ */
2697
2744
  multiple?: boolean;
2745
+ /**
2746
+ * 是否为选择文件夹
2747
+ */
2698
2748
  directory?: boolean;
2749
+ /**
2750
+ * 文件选择器接受的文件类型,如 'image/*' 表示接受所有图片文件
2751
+ * 如果指定了该配置,则不会再由extensions生成accept
2752
+ */
2753
+ accept?: string;
2699
2754
  }
2700
2755
 
2701
2756
  export declare interface EditorFollowMode {
@@ -2808,9 +2863,32 @@ export declare interface EditorFontsOptions {
2808
2863
  */
2809
2864
  list?: EditorFontsList;
2810
2865
  /**
2811
- * 是否只使用本地字体,如果为 true,则不会从服务器获取字体列表。
2866
+ * 字体列表中隐藏不可用的字体,包含外部传入的以及各套件内置的字体
2867
+ * 不可用的定义:非本地已安装且不支持下载
2868
+ */
2869
+ hideUnavailableFonts?: boolean;
2870
+ /**
2871
+ * 字体下载监听器注册函数,当字体状态发生变化时调用提供的回调函数。
2872
+ * 回调函数暂时没有参数,后续可以根据需要添加参数,例如提供变化的字体信息等。
2873
+ * @param listener
2874
+ * @returns
2875
+ */
2876
+ registerFontLoadListener?: (listener: (options: FontLoadListenerOptions) => void) => void;
2877
+ /**
2878
+ * 下载字体的函数,接受字体族名称和一个可选的配置对象作为参数。
2879
+ * 配置对象可以包含以下回调函数:
2880
+ * - onProgress: 在下载过程中调用,提供下载进度(0 到 1 之间的数字)。
2881
+ * - onComplete: 在下载完成时调用。
2882
+ * - onError: 在下载过程中发生错误时调用,提供错误对象。
2883
+ * @param fontFamily
2884
+ * @param option
2885
+ * @returns
2812
2886
  */
2813
- useLocalFontsOnly?: boolean;
2887
+ download?: (fontFamily: string, option?: {
2888
+ onProgress?: (progress: number) => void;
2889
+ onComplete?: () => void;
2890
+ onError?: (error: Error) => void;
2891
+ }) => void;
2814
2892
  }
2815
2893
 
2816
2894
  /**
@@ -2838,20 +2916,61 @@ export declare interface EditorHistory {
2838
2916
  hide: () => void;
2839
2917
  }
2840
2918
 
2841
- export declare type EditorHistoryOptions = EditorFeatureConfig;
2919
+ export declare interface EditorHistoryLimitations {
2920
+ /** 单个文件可还原的最近历史记录数量 */
2921
+ getHistoryLimitRevertNum?: () => number | undefined;
2922
+ /** 文件历史保留天数 */
2923
+ getHistoryLimitAllTime?: () => number | undefined;
2924
+ }
2925
+
2926
+ export declare type EditorHistoryOptions = EditorFeatureConfig & {
2927
+ limitations?: EditorHistoryLimitations;
2928
+ };
2842
2929
 
2843
2930
  /**
2844
2931
  * i18n 相关设置
2845
2932
  */
2846
2933
  export declare interface EditorI18nOptions {
2847
2934
  /**
2848
- * 语言,默认使用浏览器当前环境中的语言
2935
+ * 语言代码
2936
+ * 默认读取浏览器/设备语言并在支持的列表中匹配
2937
+ * 匹配规则:优先精确匹配,其次模糊匹配 language 部分,Fallback 为 en-US
2849
2938
  */
2850
- language?: string;
2939
+ language?: EditorLanguage;
2851
2940
  /**
2852
2941
  * 文本方向,默认根据语言自动适配
2853
2942
  */
2854
2943
  direction?: 'ltr' | 'rtl';
2944
+ /**
2945
+ * 时区设置(包含 ID、偏移量、标签)
2946
+ * 默认读取浏览器/设备时区,如无法匹配则根据语言推测
2947
+ * Fallback 为 { id: 'Europe/London', offset: 0, label: 'London' }
2948
+ */
2949
+ timezone?: EditorTimezoneInfo;
2950
+ /**
2951
+ * 日期格式
2952
+ * 默认根据语言自动匹配:
2953
+ * - 简繁中文、韩语、日语:YYYY/MM/DD
2954
+ * - 英语:MM/DD/YYYY
2955
+ * - 其他语言:DD/MM/YYYY
2956
+ * 用户手动设置后将保存并优先使用用户设置
2957
+ */
2958
+ dateFormat?: EditorDateFormat;
2959
+ /**
2960
+ * 时间格式
2961
+ * 默认使用 24 小时制
2962
+ * 注意:部分语言(如德语、法语、意大利语、俄语)不支持 12 小时制
2963
+ * 用户手动设置后将保存并优先使用用户设置
2964
+ */
2965
+ timeFormat?: EditorTimeFormat;
2966
+ /**
2967
+ * 周起始日
2968
+ * 默认根据语言自动匹配:
2969
+ * - 英语、阿拉伯语:星期日
2970
+ * - 其他语言:星期一
2971
+ * 用户手动设置后将保存并优先使用用户设置
2972
+ */
2973
+ weekStartDay?: EditorWeekStartDay;
2855
2974
  }
2856
2975
 
2857
2976
  export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'center' | 'east' | 'sw' | 'south' | 'se';
@@ -2896,6 +3015,27 @@ export declare interface EditorImportOptions {
2896
3015
  }>;
2897
3016
  }
2898
3017
 
3018
+ /**
3019
+ * 支持的语言代码
3020
+ * - `zh-CN` 简体中文
3021
+ * - `zh-TW` 繁体中文(含 zh-HK, zh-MO)
3022
+ * - `en-US` 英语
3023
+ * - `ja-JP` 日语
3024
+ * - `ko-KR` 韩语
3025
+ * - `es-ES` 西班牙语
3026
+ * - `pt-PT` 葡萄牙语
3027
+ * - `de-DE` 德语
3028
+ * - `fr-FR` 法语
3029
+ * - `it-IT` 意大利语
3030
+ * - `ru-RU` 俄语
3031
+ * - `id-ID` 印度尼西亚语
3032
+ * - `vi-VN` 越南语
3033
+ * - `th-TH` 泰语
3034
+ * - `ms-MY` 马来语
3035
+ * - `ar-SA` 阿拉伯语
3036
+ */
3037
+ export declare type EditorLanguage = 'zh-CN' | 'zh-TW' | 'en-US' | 'ja-JP' | 'ko-KR' | 'es-ES' | 'pt-PT' | 'de-DE' | 'fr-FR' | 'it-IT' | 'ru-RU' | 'id-ID' | 'vi-VN' | 'th-TH' | 'ms-MY' | 'ar-SA';
3038
+
2899
3039
  /**
2900
3040
  * 链接配置,抽象打开链接等操作
2901
3041
  */
@@ -3445,7 +3585,11 @@ export declare interface EditorOptions {
3445
3585
  /**
3446
3586
  * 编辑器主题相关设置
3447
3587
  */
3448
- theme: EditorThemeOptions;
3588
+ theme?: EditorThemeOptions;
3589
+ /**
3590
+ * 编辑器拼写检查相关设置
3591
+ */
3592
+ spellCheck?: EditorSpellCheckOptions;
3449
3593
  }
3450
3594
 
3451
3595
  /**
@@ -3765,6 +3909,49 @@ export declare interface EditorSocket {
3765
3909
  connected: boolean;
3766
3910
  }
3767
3911
 
3912
+ export declare interface EditorSpellCheckDictionaryFileConfig {
3913
+ /** 词典文件的 aff 文件路径 */
3914
+ aff: string;
3915
+ /** 词典文件的 dic 文件路径 */
3916
+ dic: string;
3917
+ }
3918
+
3919
+ /**
3920
+ * 拼写检查相关配置
3921
+ */
3922
+ export declare interface EditorSpellCheckOptions extends EditorFeatureConfig {
3923
+ /**
3924
+ * 拼写检查功能配置
3925
+ */
3926
+ spellCheck?: {
3927
+ /**
3928
+ * 拼写检查功能是否被禁用
3929
+ */
3930
+ disabled?: boolean;
3931
+ /**
3932
+ * 拼写检查所需要的字典文件 CDN 域名
3933
+ */
3934
+ dictionaryCDNHost?: string;
3935
+ /**
3936
+ * 自定义拼写检查词典, 用于覆盖内置的默认词典
3937
+ */
3938
+ customDictionary?: Partial<Record<EditorLanguage, EditorSpellCheckDictionaryFileConfig>>;
3939
+ };
3940
+ /**
3941
+ * 语法检查功能配置
3942
+ */
3943
+ grammarCheck?: {
3944
+ /**
3945
+ * 语法检查功能是否被禁用
3946
+ */
3947
+ disabled?: boolean;
3948
+ /**
3949
+ * 拼写检查API的URL,必须使用绝对路径
3950
+ */
3951
+ url?: string;
3952
+ };
3953
+ }
3954
+
3768
3955
  /**
3769
3956
  * 编辑器在 `standard` 模式下的权限模式
3770
3957
  * - `editor` 编辑模式
@@ -3907,6 +4094,59 @@ export declare interface EditorThemeOptions<TExtensions = object> extends Common
3907
4094
  extensions?: TExtensions;
3908
4095
  }
3909
4096
 
4097
+ /**
4098
+ * 时间格式
4099
+ * - `24h` 24 小时制(默认)
4100
+ * - `12h` 12 小时制(部分语言不支持)
4101
+ */
4102
+ export declare type EditorTimeFormat = '24h' | '12h';
4103
+
4104
+ /**
4105
+ * 支持的时区 IANA ID
4106
+ *
4107
+ * 覆盖范围: UTC-12 到 UTC+12,共 34 个全球主要城市时区
4108
+ *
4109
+ * 注意事项:
4110
+ * - 所有时区 ID 均为 IANA 时区数据库标准标识符
4111
+ * - Etc/GMT+12 表示 UTC-12(Etc/GMT 时区符号与 UTC 相反)
4112
+ * - 不包括已弃用或非标准时区标识符
4113
+ *
4114
+ * @see https://www.iana.org/time-zones
4115
+ */
4116
+ export declare type EditorTimezoneId = 'Etc/GMT+12' | 'Pacific/Pago_Pago' | 'Pacific/Honolulu' | 'America/Anchorage' | 'America/Los_Angeles' | 'America/Denver' | 'America/Mexico_City' | 'America/New_York' | 'America/Santiago' | 'America/Sao_Paulo' | 'Atlantic/South_Georgia' | 'Atlantic/Cape_Verde' | 'Europe/London' | 'Europe/Lisbon' | 'Europe/Paris' | 'Europe/Berlin' | 'Europe/Rome' | 'Europe/Madrid' | 'Africa/Cairo' | 'Europe/Moscow' | 'Asia/Riyadh' | 'Asia/Dubai' | 'Asia/Karachi' | 'Asia/Dhaka' | 'Asia/Bangkok' | 'Asia/Jakarta' | 'Asia/Ho_Chi_Minh' | 'Asia/Shanghai' | 'Asia/Kuala_Lumpur' | 'Asia/Tokyo' | 'Asia/Seoul' | 'Australia/Sydney' | 'Pacific/Guadalcanal' | 'Pacific/Auckland';
4117
+
4118
+ /**
4119
+ * 时区信息
4120
+ */
4121
+ export declare interface EditorTimezoneInfo {
4122
+ /**
4123
+ * IANA 时区 ID
4124
+ *
4125
+ * 标准的 IANA 时区数据库标识符
4126
+ *
4127
+ * @example 'Asia/Shanghai', 'America/New_York', 'Europe/London'
4128
+ */
4129
+ id: EditorTimezoneId;
4130
+ /**
4131
+ * UTC 偏移量(小时,标准时间)
4132
+ *
4133
+ * - 正数:东半球,如 `8` 表示 UTC+8(北京)
4134
+ * - 负数:西半球,如 `-5` 表示 UTC-5(纽约标准时间)
4135
+ * - 零:格林威治标准时间
4136
+ *
4137
+ * 注意:此值为标准时间,不包含夏令时调整
4138
+ */
4139
+ offset: number;
4140
+ /**
4141
+ * 时区标签(英文)
4142
+ *
4143
+ * 用于 UI 显示的城市或地区名称
4144
+ *
4145
+ * @example 'Shanghai', 'New York', 'London'
4146
+ */
4147
+ label: string;
4148
+ }
4149
+
3910
4150
  /**
3911
4151
  * 工具栏功能按钮配置(包括内置按钮和自定义按钮)
3912
4152
  */
@@ -3970,6 +4210,16 @@ export declare interface EditorToolbarOptions<TName extends string> {
3970
4210
  * 如果不配置则按照套件的默认方式挂载。
3971
4211
  */
3972
4212
  container?: HTMLElement;
4213
+ /**
4214
+ * 工具栏样式
4215
+ * 各套件可自行扩展,目前支持背景色配置
4216
+ */
4217
+ style?: {
4218
+ /**
4219
+ * 背景色
4220
+ */
4221
+ backgroundColor?: string;
4222
+ };
3973
4223
  }
3974
4224
 
3975
4225
  /**
@@ -4183,9 +4433,11 @@ export declare interface EditorUserOptions {
4183
4433
  export declare interface EditorVersion {
4184
4434
  /**
4185
4435
  * 保存版本
4186
- * @param name 版本名称
4436
+ * @param options 版本名称
4187
4437
  */
4188
- createRevision: (name?: string) => void;
4438
+ createRevision: (options?: string | {
4439
+ name: string;
4440
+ }) => void;
4189
4441
  /**
4190
4442
  * 显示版本(侧边栏或其他形式)
4191
4443
  * 区别于历史侧边栏,在应用表格里表现为打开历史侧边栏切换到版本 tab
@@ -4198,7 +4450,14 @@ export declare interface EditorVersion {
4198
4450
  hide?: () => void;
4199
4451
  }
4200
4452
 
4201
- export declare type EditorVersionOptions = EditorFeatureConfig;
4453
+ export declare interface EditorVersionLimitations {
4454
+ /** 单个文件可保存/还原的版本(快照)数量 */
4455
+ getHistoryLimitVersionNum?: () => number | undefined;
4456
+ }
4457
+
4458
+ export declare type EditorVersionOptions = EditorFeatureConfig & {
4459
+ limitations?: EditorVersionLimitations;
4460
+ };
4202
4461
 
4203
4462
  /**
4204
4463
  * 编辑器外部水印信息
@@ -4228,6 +4487,13 @@ export declare type EditorWatermarkResource = {
4228
4487
  url: string;
4229
4488
  };
4230
4489
 
4490
+ /**
4491
+ * 周起始日
4492
+ * - `sunday` 星期日(英语、阿拉伯语默认)
4493
+ * - `monday` 星期一(其他语言默认)
4494
+ */
4495
+ export declare type EditorWeekStartDay = 'sunday' | 'monday';
4496
+
4231
4497
  export declare interface FileLinkParams {
4232
4498
  /**
4233
4499
  * 文件guid
@@ -4299,6 +4565,35 @@ export declare interface FontFamilyConfig {
4299
4565
  base: string;
4300
4566
  }
4301
4567
 
4568
+ /**
4569
+ * 字体下载事件类型
4570
+ */
4571
+ export declare enum FontLoadEventType {
4572
+ DownloadStart = "downloadStart",
4573
+ DownloadProgress = "downloadProgress",
4574
+ DownloadComplete = "downloadComplete",
4575
+ DownloadError = "downloadError"
4576
+ }
4577
+
4578
+ /**
4579
+ * 字体下载事件监听器参数,根据事件类型提供不同的属性
4580
+ */
4581
+ export declare type FontLoadListenerOptions = {
4582
+ type: FontLoadEventType.DownloadStart;
4583
+ id: string;
4584
+ } | {
4585
+ type: FontLoadEventType.DownloadComplete;
4586
+ id: string;
4587
+ } | {
4588
+ type: FontLoadEventType.DownloadProgress;
4589
+ id: string;
4590
+ progress: number;
4591
+ } | {
4592
+ type: FontLoadEventType.DownloadError;
4593
+ id: string;
4594
+ error: Error;
4595
+ };
4596
+
4302
4597
  /** 字号配置 */
4303
4598
  export declare interface FontSizeConfig {
4304
4599
  /** 超小字号 */
@@ -4433,6 +4728,16 @@ export declare interface HTTPProxy {
4433
4728
  * @returns
4434
4729
  */
4435
4730
  create: (id: string) => Promise<HTTPProxy>;
4731
+ /**
4732
+ * 凭证更新器,用于套件内部主动发起更新凭证操作
4733
+ * 例如:页面可见性发生变化时,在pull请求发起之前
4734
+ */
4735
+ credentials?: {
4736
+ /**
4737
+ * 更新凭证
4738
+ */
4739
+ update: () => Promise<void>;
4740
+ };
4436
4741
  }
4437
4742
 
4438
4743
  /**
@@ -4632,6 +4937,8 @@ export declare interface InputStateColorStyles {
4632
4937
  textColorNormal: string;
4633
4938
  /** 禁用文字颜色 */
4634
4939
  textColorDisabled: string;
4940
+ /** 只读文字颜色 */
4941
+ textColorReadOnly: string;
4635
4942
  }
4636
4943
 
4637
4944
  /** Input 状态样式配置 */
@@ -4718,8 +5025,15 @@ export declare interface MentionInfo {
4718
5025
  export declare interface MenuConfig {
4719
5026
  /** 菜单项配置 */
4720
5027
  menuItem: MenuItemConfig;
5028
+ /** 子菜单 */
5029
+ subMenu: {
5030
+ /** 子菜单弹出位置偏移 */
5031
+ popupOffset: number[];
5032
+ };
4721
5033
  /** 边框 */
4722
5034
  border: BorderConfig;
5035
+ /** 阴影 */
5036
+ boxShadow: Pick<StateStyles, 'normal' | 'hover'>;
4723
5037
  /** 分割线 */
4724
5038
  divider: {
4725
5039
  background: string;
@@ -4743,6 +5057,8 @@ export declare interface MenuItemConfig {
4743
5057
  active: string;
4744
5058
  disabled: string;
4745
5059
  };
5060
+ /** 边框 */
5061
+ border: BorderConfig;
4746
5062
  /** 布局 */
4747
5063
  layout: {
4748
5064
  /** 内边距 */
@@ -4774,6 +5090,8 @@ export declare interface MenuItemConfig {
4774
5090
  };
4775
5091
  /** 尺寸 */
4776
5092
  size: {
5093
+ /** 小尺寸 */
5094
+ small: MenuItemSizeStyles;
4777
5095
  /** 中尺寸 */
4778
5096
  medium: MenuItemSizeStyles;
4779
5097
  /** 大尺寸 */
@@ -5046,6 +5364,7 @@ export declare interface SliderSizeStyles {
5046
5364
  thumbSize: string;
5047
5365
  /** 滑块偏移(距离边缘的间距) */
5048
5366
  thumbOffset: string;
5367
+ borderWidth: string;
5049
5368
  }
5050
5369
 
5051
5370
  /** Slider 滑块(圆点)样式 */
@@ -5060,6 +5379,8 @@ export declare interface SliderTrackStyles {
5060
5379
  backgroundDisabled: string;
5061
5380
  /** 已填充部分背景 */
5062
5381
  filledBackground: string;
5382
+ /** 已填充部分禁用状态背景 */
5383
+ filledBackgroundDisabled: string;
5063
5384
  /** 高度 */
5064
5385
  height: string;
5065
5386
  /** 宽度 */
@@ -5213,7 +5534,18 @@ export declare interface SyncStatusDelegation {
5213
5534
  /** Tab 完整配置 */
5214
5535
  export declare interface TabConfig {
5215
5536
  /** 线性标签页(仅下边框) */
5216
- line: TabVariantStyles;
5537
+ line: {
5538
+ backgroundColor: string;
5539
+ item: TabStateStyles & {
5540
+ /** 选中底部线条宽度/高度 */
5541
+ bottomActiveWidth: string;
5542
+ /** 选中底部线条圆角 */
5543
+ bottomActiveBorderRadius: string;
5544
+ /** 选中底部线条背景颜色 */
5545
+ bottomActiveBackgroundColor: string;
5546
+ };
5547
+ layout: TabLayoutStyles;
5548
+ };
5217
5549
  /** 面性标签页(带所有边框) */
5218
5550
  card: TabVariantStyles;
5219
5551
  /** 大尺寸配置 */
@@ -5237,8 +5569,10 @@ export declare interface TabStateStyles extends BackgroundStateStyles, BorderSta
5237
5569
  export declare interface TabVariantStyles {
5238
5570
  /** Tab 项状态样式 */
5239
5571
  item: TabStateStyles;
5240
- /** 布局样式 */
5572
+ /** 布局 */
5241
5573
  layout: TabLayoutStyles;
5574
+ /** tab条背景颜色 */
5575
+ backgroundColor: string;
5242
5576
  }
5243
5577
 
5244
5578
  /** Text Button 变体配置(在基础变体上扩展带背景色的引导样式) */
@@ -5319,6 +5653,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
5319
5653
  error: ToastVariantStyles;
5320
5654
  /** 警告提示样式 */
5321
5655
  warn: ToastVariantStyles;
5656
+ /** 严重警告样式 */
5657
+ critical: ToastVariantStyles;
5658
+ /** 加载提示样式 */
5659
+ loading: ToastVariantStyles;
5322
5660
  /** 偏移量 */
5323
5661
  offset: {
5324
5662
  /** 垂直偏移量 */
@@ -5326,6 +5664,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
5326
5664
  /** 水平偏移量 */
5327
5665
  horizontal: string;
5328
5666
  };
5667
+ /** 关闭按钮 */
5668
+ closeButton: {
5669
+ icon: Pick<IconConfig, 'url'>;
5670
+ };
5329
5671
  }
5330
5672
 
5331
5673
  /**
@@ -5397,6 +5739,11 @@ export declare interface ToastVariantStyles {
5397
5739
  borderColor: string;
5398
5740
  /** 图标配置 */
5399
5741
  icon: IconConfig;
5742
+ /** 消息 */
5743
+ message: {
5744
+ /** 颜色 */
5745
+ color: string;
5746
+ };
5400
5747
  }
5401
5748
 
5402
5749
  /** ToolbarButton 背景状态样式 */
@@ -5442,6 +5789,8 @@ export declare interface ToolbarButtonLayout {
5442
5789
  padding: string;
5443
5790
  /** 整体高度 */
5444
5791
  height: string;
5792
+ /** 整体圆角 */
5793
+ borderRadius: string;
5445
5794
  /** 内容布局 */
5446
5795
  content: {
5447
5796
  padding: string;
@@ -5536,6 +5885,8 @@ export declare interface TooltipStyleConfig {
5536
5885
  lineHeight: string;
5537
5886
  /** 字重 */
5538
5887
  fontWeight: number;
5888
+ /** 最大宽度 */
5889
+ maxWidth?: string;
5539
5890
  }
5540
5891
 
5541
5892
  /** Tooltip White 风格配置 */