@officesdk/editor-sdk-core 0.0.0-10 → 0.0.0-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 (89) hide show
  1. package/cjs/diagram/index.js +16 -1
  2. package/cjs/diagram/sdk.js +1 -1
  3. package/cjs/docs/index.js +21 -0
  4. package/cjs/docs/info.js +3 -0
  5. package/cjs/docs/range.js +7 -0
  6. package/cjs/docs/sdk.js +28 -0
  7. package/cjs/docs/selection.js +3 -0
  8. package/cjs/docx/context-menu.js +3 -0
  9. package/cjs/docx/index.js +16 -1
  10. package/cjs/docx/info.js +1 -1
  11. package/cjs/docx/menu.js +1 -1
  12. package/cjs/docx/sdk.js +1 -1
  13. package/cjs/docx/selection.js +1 -1
  14. package/cjs/docx/theme.js +1 -1
  15. package/cjs/docx/window.js +1 -1
  16. package/cjs/pdf/index.js +16 -1
  17. package/cjs/presentation/index.js +16 -1
  18. package/cjs/presentation/sdk.js +1 -1
  19. package/cjs/presentation/toolbar.js +3 -0
  20. package/cjs/shared/attachment.js +3 -0
  21. package/cjs/shared/content.js +1 -1
  22. package/cjs/shared/context-menu.js +3 -0
  23. package/cjs/shared/editor.js +1 -1
  24. package/cjs/shared/export.js +3 -0
  25. package/cjs/shared/file-picker.js +3 -0
  26. package/cjs/shared/index.js +5 -2
  27. package/cjs/shared/menu.js +1 -1
  28. package/cjs/shared/toolbar.js +1 -1
  29. package/cjs/shared/uploader.js +22 -0
  30. package/cjs/shared/user.js +1 -1
  31. package/cjs/sheet/index.js +16 -1
  32. package/cjs/sheet/sdk.js +1 -1
  33. package/cjs/table/content.js +3 -0
  34. package/cjs/table/index.js +23 -0
  35. package/cjs/table/resource.js +3 -0
  36. package/cjs/table/sdk.js +11 -0
  37. package/cjs/table/selection.js +21 -0
  38. package/cjs/table/table.js +3 -0
  39. package/esm/diagram/index.js +2 -1
  40. package/esm/diagram/sdk.js +1 -1
  41. package/esm/docs/index.js +3 -0
  42. package/esm/docs/info.js +2 -0
  43. package/esm/docs/range.js +6 -0
  44. package/esm/docs/sdk.js +25 -0
  45. package/esm/docs/selection.js +2 -0
  46. package/esm/docx/context-menu.js +2 -0
  47. package/esm/docx/index.js +2 -1
  48. package/esm/docx/info.js +1 -1
  49. package/esm/docx/menu.js +1 -1
  50. package/esm/docx/sdk.js +1 -1
  51. package/esm/docx/selection.js +1 -1
  52. package/esm/docx/theme.js +1 -1
  53. package/esm/docx/window.js +1 -1
  54. package/esm/pdf/index.js +2 -1
  55. package/esm/presentation/index.js +2 -1
  56. package/esm/presentation/sdk.js +1 -1
  57. package/esm/presentation/toolbar.js +2 -0
  58. package/esm/shared/attachment.js +2 -0
  59. package/esm/shared/content.js +1 -1
  60. package/esm/shared/context-menu.js +2 -0
  61. package/esm/shared/editor.js +1 -1
  62. package/esm/shared/export.js +2 -0
  63. package/esm/shared/file-picker.js +2 -0
  64. package/esm/shared/index.js +2 -1
  65. package/esm/shared/menu.js +1 -1
  66. package/esm/shared/toolbar.js +1 -1
  67. package/esm/shared/uploader.js +19 -0
  68. package/esm/shared/user.js +1 -1
  69. package/esm/sheet/index.js +2 -1
  70. package/esm/sheet/sdk.js +1 -1
  71. package/esm/table/content.js +2 -0
  72. package/esm/table/index.js +4 -0
  73. package/esm/table/resource.js +2 -0
  74. package/esm/table/sdk.js +8 -0
  75. package/esm/table/selection.js +18 -0
  76. package/esm/table/table.js +2 -0
  77. package/package.json +72 -7
  78. package/types/diagram.d.ts +1454 -0
  79. package/types/docs.d.ts +1581 -0
  80. package/{docx.d.ts → types/docx.d.ts} +535 -114
  81. package/types/pdf.d.ts +1663 -0
  82. package/{presentation.d.ts → types/presentation.d.ts} +488 -61
  83. package/{shared.d.ts → types/shared.d.ts} +341 -18
  84. package/{sheet.d.ts → types/sheet.d.ts} +448 -63
  85. package/types/table.d.ts +1704 -0
  86. package/cjs/index.js +0 -16
  87. package/diagram.d.ts +0 -358
  88. package/esm/index.js +0 -7
  89. package/pdf.d.ts +0 -760
@@ -1,16 +1,12 @@
1
1
  export declare abstract class AbstractedDocxSDK extends EditorSDK {
2
2
  /**
3
- * 打印文档
3
+ * 文档准备就绪
4
4
  */
5
- abstract print(): Promise<void>;
5
+ abstract ready(): Promise<void>;
6
6
  /**
7
- * 跳转到某个位置
8
- */
9
- abstract goto(options: DocxGotoOptions): boolean;
10
- /**
11
- * 文档缩放接口
12
- * @param scale
7
+ * 打印文档
13
8
  */
9
+ abstract print(): Promise<void>;
14
10
  /**
15
11
  * 文档目录集合接口,
16
12
  * 一个文档中可以存在多个目录,这个接口是用来管理文档中的所有目录的。
@@ -46,6 +42,46 @@ export declare abstract class AbstractedDocxSDK extends EditorSDK {
46
42
  abstract get search(): DocxSearch;
47
43
  }
48
44
 
45
+ export declare abstract class AbstractedEditorFileUploader {
46
+ /**
47
+ * 开始上传
48
+ * @param options
49
+ */
50
+ abstract start(options: EditorUploadStartOptions): EditorUploadTaskInfo[];
51
+ /**
52
+ * 暂停上传,不传参数则取消所有上传任务
53
+ * @param taskIds
54
+ */
55
+ abstract pause(taskIds?: string[]): void;
56
+ /**
57
+ * 暂停上传,不传参数则暂停所有上传任务
58
+ * @param taskIds
59
+ */
60
+ abstract abort(taskIds?: string[]): void;
61
+ /**
62
+ * 恢复上传,不传参数则恢复所有上传任务
63
+ * @param taskIds
64
+ */
65
+ abstract resume(taskIds?: string[]): void;
66
+ }
67
+
68
+ /**
69
+ * 传统文档工具栏一级菜单
70
+ */
71
+ export declare type DocxContextMenuEntryConfig = EditorContextMenuEntryConfig<DocxContextMenuFeatureButtonName>;
72
+
73
+ /**
74
+ * 传统文档工具栏功能按钮
75
+ */
76
+ export declare type DocxContextMenuFeatureButtonConfig = EditorContextMenuFeatureButtonConfig<DocxContextMenuFeatureButtonName>;
77
+
78
+ /**
79
+ * 传统文档右键菜单功能按钮
80
+ */
81
+ export declare type DocxContextMenuFeatureButtonName = 'cut' | 'copy' | 'paste' | 'delete' | 'font' | 'paragraph' | 'downloadAttachment' | 'transformPDF';
82
+
83
+ export declare type DocxContextMenuOptions = EditorContextMenuOptions<DocxContextMenuFeatureButtonName>;
84
+
49
85
  export declare type DocxFontFace = Omit<EditorFontFace, 'meta'> & {
50
86
  meta: DocxFontMeta;
51
87
  };
@@ -117,40 +153,6 @@ export declare interface DocxFontsOptions {
117
153
  list: DocxFontsList;
118
154
  }
119
155
 
120
- export declare type DocxGotoOptions = {
121
- /**
122
- * 区域,跳转到对应区域位置
123
- */
124
- type: 'range';
125
- /**
126
- * 区域值,这个值可以通过 DocxSelection 的 getRange 方法拿到
127
- */
128
- range: string;
129
- } | {
130
- /**
131
- * 页码,跳转到对应页码位置
132
- */
133
- type: 'page';
134
- /**
135
- * 页码
136
- */
137
- page: number;
138
- } | {
139
- /**
140
- * 顶部,跳转到文档顶部
141
- */
142
- type: 'top';
143
- } | {
144
- /**
145
- * 跳转到某个评论
146
- */
147
- type: 'comment';
148
- /**
149
- * 评论 ID
150
- */
151
- commentId: string;
152
- };
153
-
154
156
  /**
155
157
  * 图片水印属性值
156
158
  */
@@ -180,6 +182,8 @@ export declare interface DocxInfoOptions {
180
182
  time?: number;
181
183
  author?: string;
182
184
  };
185
+ id: string;
186
+ name: string;
183
187
  }
184
188
 
185
189
  /**
@@ -195,7 +199,7 @@ export declare type DocxMenuFeatureButtonConfig = EditorMenuFeatureButtonConfig<
195
199
  /**
196
200
  * 传统文档工具栏内置功能按钮
197
201
  */
198
- export declare type DocxMenuFeatureButtonName = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'export' | 'saveTemplate' | 'viewHistory' | 'saveHistory' | 'attachment' | 'cloudFile' | 'signature' | 'image';
202
+ export declare type DocxMenuFeatureButtonName = 'file' | 'edit' | 'insert' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'export' | 'saveTemplate' | 'viewHistory' | 'saveHistory' | 'exportImage' | 'exportPDF' | 'exportWPS' | 'exportImagePDF' | 'insertAttachment' | 'insertCloudFile' | 'insertSignature' | 'insertImageFromUrl';
199
203
 
200
204
  export declare type DocxMenuOptions = EditorMenuOptions<DocxMenuFeatureButtonName>;
201
205
 
@@ -363,6 +367,10 @@ export declare interface DocxSDKOptions extends EditorOptions {
363
367
  * 菜单栏相关设置
364
368
  */
365
369
  menu?: DocxMenuOptions;
370
+ /**
371
+ * 右键菜单相关设置
372
+ */
373
+ contextMenu?: DocxContextMenuOptions;
366
374
  /**
367
375
  * Pdf 大纲目录设置
368
376
  */
@@ -486,6 +494,19 @@ export declare interface DocxSelection {
486
494
  * @returns
487
495
  */
488
496
  getWholeRange: () => DocxRange;
497
+ /**
498
+ * 向当前选区位置插入文本,
499
+ * 返回插入后当前选区位置
500
+ * @param text
501
+ * @returns
502
+ */
503
+ insertText: (text: string) => DocxRangeValue;
504
+ /**
505
+ * 向当前选区位置插入 HTML 内容,
506
+ * 返回插入后当前选区位置
507
+ * @param html
508
+ */
509
+ insertHtml: (html: string) => DocxRangeValue;
489
510
  }
490
511
 
491
512
  /**
@@ -571,9 +592,9 @@ export declare interface DocxThemeFontsSchemeItem {
571
592
  * 其他单独字体配置
572
593
  * key 表示script值
573
594
  * 例如:
574
- * <a:font script="Hans" typeface="黑体"/>
575
- * <a:font script="Jpan" typeface="HG明朝B"/>
576
- * <a:font script="Arab" typeface="Times New Roman"/>
595
+ * <a:font script="Hans" typeface="黑体"/\>
596
+ * <a:font script="Jpan" typeface="HG明朝B"/\>
597
+ * <a:font script="Arab" typeface="Times New Roman"/\>
577
598
  */
578
599
  font: Record<string, DocxThemeFont>;
579
600
  }
@@ -817,12 +838,21 @@ export declare type DocxWatermarkOptions = EditorWatermarkOptions;
817
838
  * 文档窗口接口
818
839
  */
819
840
  export declare interface DocxWindow {
841
+ /**
842
+ * 获取当前文档滚动位置,
843
+ * 返回值为当前文档滚动位置的偏移量,
844
+ * 这个偏移量是基于文档的左上角为原点,向右向下为正方向
845
+ * @returns
846
+ */
847
+ getScrollPosition: () => {
848
+ x: number;
849
+ y: number;
850
+ };
820
851
  /**
821
852
  * 滚动到指定位置
822
- * @param x
823
- * @param y
853
+ * @param params 滚动参数
824
854
  */
825
- scrollTo: (x: number, y: number) => void;
855
+ scrollTo: (params: DocxWindowScrollParams) => void;
826
856
  /**
827
857
  * 滚动到指定页面
828
858
  * @param page
@@ -832,7 +862,7 @@ export declare interface DocxWindow {
832
862
  * 将传入的区域滚动到可视区域
833
863
  * @param range
834
864
  */
835
- scrollIntoView: (range: DocxRangeValue) => void;
865
+ scrollIntoView: (range: DocxRangeValue, options?: DocxWindowScrollIntoViewOptions) => void;
836
866
  /**
837
867
  * 添加滚动监听器
838
868
  * @param listener
@@ -843,6 +873,79 @@ export declare interface DocxWindow {
843
873
  }) => void) => () => void;
844
874
  }
845
875
 
876
+ /**
877
+ * 滚动到指定区域的选项
878
+ */
879
+ export declare interface DocxWindowScrollIntoViewOptions {
880
+ /**
881
+ * 滚动到指定区域的位置,默认是start
882
+ */
883
+ position?: 'start' | 'end';
884
+ /**
885
+ * 是否将滚动到的区域置于文档可见范围的顶部。默认为bottom
886
+ */
887
+ alignment?: 'top' | 'bottom';
888
+ }
889
+
890
+ export declare type DocxWindowScrollParams = {
891
+ /**
892
+ * 区域,跳转到对应区域位置
893
+ */
894
+ type: 'range';
895
+ /**
896
+ * 区域值,这个值可以通过 DocxSelection 的 getRange 方法拿到,取start或者end
897
+ */
898
+ range: string;
899
+ } | {
900
+ /**
901
+ * 页码,跳转到对应页码位置
902
+ */
903
+ type: 'page';
904
+ /**
905
+ * 页码
906
+ */
907
+ page: number;
908
+ } | {
909
+ /**
910
+ * 顶部,跳转到文档顶部
911
+ */
912
+ type: 'top';
913
+ } | {
914
+ /**
915
+ * 滚动到某个位置,
916
+ * 这个位置是基于文档的左上角为原点,向右向下为正方向
917
+ */
918
+ type: 'position';
919
+ /**
920
+ * 位置
921
+ */
922
+ position: {
923
+ x: number;
924
+ y: number;
925
+ };
926
+ } | {
927
+ /**
928
+ * 偏移量,跳转到对应偏移量位置
929
+ */
930
+ type: 'offset';
931
+ /**
932
+ * 偏移量
933
+ */
934
+ offset: {
935
+ x: number;
936
+ y: number;
937
+ };
938
+ } | {
939
+ /**
940
+ * 跳转到某个评论
941
+ */
942
+ type: 'comment';
943
+ /**
944
+ * 评论 ID
945
+ */
946
+ commentId: string;
947
+ };
948
+
846
949
  /**
847
950
  * 文档缩放接口
848
951
  */
@@ -881,10 +984,25 @@ export declare interface DocxZoom {
881
984
  zoomOut: () => void;
882
985
  }
883
986
 
987
+ /**
988
+ * 匿名用户信息
989
+ * 当前用户信息未知时的缺省值
990
+ */
991
+ export declare interface EditorAnonymousOptions {
992
+ /**
993
+ * 匿名用户默认显示名称
994
+ */
995
+ name: string;
996
+ /**
997
+ * 匿名用户默认头像
998
+ */
999
+ avatar: string;
1000
+ }
1001
+
884
1002
  /**
885
1003
  * 编辑器内部资源请求配置
886
1004
  */
887
- declare interface EditorAssetsOptions {
1005
+ export declare interface EditorAssetsOptions {
888
1006
  /**
889
1007
  * 通用资源请求代理配置,
890
1008
  * 用于套件内部资源请求时代理请求
@@ -903,7 +1021,7 @@ declare interface EditorAssetsOptions {
903
1021
  /**
904
1022
  * 基于对象存储的图片处理抽象
905
1023
  */
906
- declare interface EditorAssetsOssImageProcessing {
1024
+ export declare interface EditorAssetsOssImageProcessing {
907
1025
  /**
908
1026
  * 压缩图片的方法
909
1027
  * @param imageUrl 图片的 URL
@@ -930,7 +1048,7 @@ declare interface EditorAssetsOssImageProcessing {
930
1048
  }) => Promise<string>;
931
1049
  }
932
1050
 
933
- declare interface EditorAssetsResolver {
1051
+ export declare interface EditorAssetsResolver {
934
1052
  /**
935
1053
  * 将资源文件 ID 转换为 URL 的方法
936
1054
  * @param assetId 资源文件 ID
@@ -952,11 +1070,121 @@ declare interface EditorAssetsResolver {
952
1070
  checkAssetReady: (assetId: string) => Promise<boolean> | boolean;
953
1071
  }
954
1072
 
1073
+ /**
1074
+ * 编辑器附件限制配置,sdk中会使用在不同的场景下使用不同的限制规则组合
1075
+ */
1076
+ export declare interface EditorAttachmentLimitationOptions {
1077
+ /**
1078
+ * 检查附件大小的规则
1079
+ * @param file
1080
+ * @returns
1081
+ */
1082
+ checkFile: (params: EditorAttachmentLimitationOptionsCheckFunctionParams) => Promise<{
1083
+ limited: true;
1084
+ message: string;
1085
+ } | {
1086
+ limited: false;
1087
+ }>;
1088
+ }
1089
+
1090
+ /**
1091
+ * 编辑器附件限制配置检查函数参数
1092
+ */
1093
+ export declare interface EditorAttachmentLimitationOptionsCheckFunctionParams {
1094
+ /**
1095
+ * 文件名称,带后缀名
1096
+ */
1097
+ name: string;
1098
+ /**
1099
+ * 文件大小,单位为Byte
1100
+ */
1101
+ size: number;
1102
+ /**
1103
+ * 文件的mime类型,例如image/jpeg、application/vnd.ms-excel等
1104
+ */
1105
+ mime?: string;
1106
+ }
1107
+
1108
+ /**
1109
+ * 编辑器附件限制配置
1110
+ * @deprecated 使用limitations代替
1111
+ */
1112
+ export declare interface EditorAttachmentMaxSizeOptions {
1113
+ /**
1114
+ * 图片大小上限值,单位为Byte
1115
+ * 设置为Infinity时表示不限制图片大小
1116
+ */
1117
+ value?: number;
1118
+ /**
1119
+ * 超限警告相关配置
1120
+ */
1121
+ warning?: {
1122
+ /**
1123
+ * 超限警告文本
1124
+ */
1125
+ text?: string;
1126
+ };
1127
+ }
1128
+
1129
+ /**
1130
+ * 编辑器附件信息
1131
+ */
1132
+ export declare interface EditorAttachmentOptions {
1133
+ uploader: AbstractedEditorFileUploader;
1134
+ download: (url: string) => void;
1135
+ /**
1136
+ * 图片附件相关配置
1137
+ */
1138
+ image?: {
1139
+ /**
1140
+ * 图片大小上限相关配置
1141
+ * @deprecated 使用limitations代替
1142
+ */
1143
+ maxSize?: EditorAttachmentMaxSizeOptions;
1144
+ /**
1145
+ * 支持的图片格式列表,例如jpg,png等
1146
+ */
1147
+ supportTypes?: string[];
1148
+ /**
1149
+ * 图片附件的限制配置
1150
+ */
1151
+ limitations?: EditorAttachmentLimitationOptions;
1152
+ };
1153
+ /**
1154
+ * 其他附件相关配置
1155
+ */
1156
+ attachment?: {
1157
+ /**
1158
+ * 图片大小上限相关配置
1159
+ * @deprecated 使用limitations代替
1160
+ */
1161
+ maxSize?: EditorAttachmentMaxSizeOptions;
1162
+ /**
1163
+ * 支持的附件格式列表,例如doc,docx等
1164
+ */
1165
+ supportTypes?: string[];
1166
+ /**
1167
+ * 附件的限制配置
1168
+ */
1169
+ limitations?: EditorAttachmentLimitationOptions;
1170
+ };
1171
+ }
1172
+
1173
+ /**
1174
+ * 基础文件属性
1175
+ */
1176
+ export declare interface EditorBaseUploadableFile {
1177
+ secretly?: boolean;
1178
+ bucket: 'images' | 'attachments';
1179
+ encrypt: string;
1180
+ fileGuid: string;
1181
+ }
1182
+
955
1183
  /**
956
1184
  * 品牌相关设置,
957
1185
  * 用于在套件中展示品牌外露信息
958
1186
  */
959
- declare interface EditorBrandOptions {
1187
+ export declare interface EditorBrandOptions {
960
1188
  /**
961
1189
  * 需要显示在品牌展示位的内容,按数组顺序显示
962
1190
  */
@@ -980,7 +1208,7 @@ declare interface EditorBrandOptions {
980
1208
  /**
981
1209
  * 单条评论数据
982
1210
  */
983
- declare interface EditorCommentItem {
1211
+ export declare interface EditorCommentItem {
984
1212
  /**
985
1213
  * 评论 ID
986
1214
  */
@@ -997,7 +1225,7 @@ declare interface EditorCommentItem {
997
1225
  };
998
1226
  }
999
1227
 
1000
- declare interface EditorComments {
1228
+ export declare interface EditorComments {
1001
1229
  /**
1002
1230
  * 检查是否有评论
1003
1231
  * @returns
@@ -1043,7 +1271,7 @@ declare interface EditorComments {
1043
1271
  /**
1044
1272
  * 编辑器评论初始化配置
1045
1273
  */
1046
- declare interface EditorCommentsOptions {
1274
+ export declare interface EditorCommentsOptions {
1047
1275
  /**
1048
1276
  * 评论作者信息,如果这里的信息为空,将会使用 user 信息
1049
1277
  */
@@ -1074,7 +1302,7 @@ declare interface EditorCommentsOptions {
1074
1302
  };
1075
1303
  }
1076
1304
 
1077
- declare interface EditorContent {
1305
+ export declare interface EditorContent<Delta = EditorDelta> {
1078
1306
  /**
1079
1307
  * 设置编辑器内容
1080
1308
  * @param content
@@ -1083,15 +1311,42 @@ declare interface EditorContent {
1083
1311
  /**
1084
1312
  * 获取编辑器内容
1085
1313
  */
1086
- getContent: () => Promise<EditorDelta>;
1314
+ getContent: () => Promise<Delta>;
1087
1315
  /**
1088
1316
  * 添加监听,当内容发生变化时触发监听,传入 Delta
1089
1317
  * @param listener
1090
1318
  */
1091
- addChangeListener: (listener: (change: EditorDelta) => void) => () => void;
1319
+ addChangeListener: (listener: (change: Delta) => void) => () => void;
1092
1320
  }
1093
1321
 
1094
- declare interface EditorDelta {
1322
+ /**
1323
+ * 右键菜单栏二级以下的菜单入口
1324
+ */
1325
+ export declare type EditorContextMenuEntryButton<TName extends string> = EditorMenuEntryButton<TName>;
1326
+
1327
+ /**
1328
+ * 右键菜单栏一级菜单配置,此处用于定义一级菜单的操作入口,
1329
+ * 右键菜单栏一级菜单指点击右键弹出菜单时的菜单项
1330
+ */
1331
+ export declare type EditorContextMenuEntryConfig<TName extends string> = EditorMenuEntryConfig<TName>;
1332
+
1333
+ /**
1334
+ * 右键菜单栏功能按钮配置
1335
+ */
1336
+ export declare type EditorContextMenuFeatureButton<TName extends string> = EditorMenuFeatureButton<TName>;
1337
+
1338
+ /**
1339
+ * 右键菜单栏按钮配置
1340
+ */
1341
+ export declare type EditorContextMenuFeatureButtonConfig<TName extends string> = EditorMenuFeatureButtonConfig<TName>;
1342
+
1343
+ /**
1344
+ * 右键菜单栏相关配置
1345
+ * 右键菜单栏是指的编辑器中点击右键弹出的菜单栏。目前等于菜单栏配置,可扩展
1346
+ */
1347
+ export declare type EditorContextMenuOptions<TName extends string> = EditorMenuOptions<TName>;
1348
+
1349
+ export declare interface EditorDelta {
1095
1350
  compose: (other: EditorDelta, isDocument?: boolean) => EditorDelta;
1096
1351
  transform: (other: EditorDelta, priority?: boolean) => EditorDelta;
1097
1352
  stringify: () => string;
@@ -1101,7 +1356,7 @@ declare interface EditorDelta {
1101
1356
  /**
1102
1357
  * 编辑器嵌入对象
1103
1358
  */
1104
- declare interface EditorEmbeddedObject {
1359
+ export declare interface EditorEmbeddedObject {
1105
1360
  /**
1106
1361
  * 嵌入的对象 url
1107
1362
  */
@@ -1119,7 +1374,7 @@ declare interface EditorEmbeddedObject {
1119
1374
  /**
1120
1375
  * 编辑器嵌入对象抽象类
1121
1376
  */
1122
- declare interface EditorEmbeddedObjectOptions {
1377
+ export declare interface EditorEmbeddedObjectOptions {
1123
1378
  /**
1124
1379
  * 执行打开嵌入对象操作,
1125
1380
  * 如果已经处理了打开操作,返回 true,否则返回 false,
@@ -1147,7 +1402,20 @@ declare interface EditorEmbeddedObjectOptions {
1147
1402
  };
1148
1403
  }
1149
1404
 
1150
- declare interface EditorFontFace {
1405
+ export declare interface EditorExportOptions {
1406
+ /**
1407
+ * 可导出类型
1408
+ * @description
1409
+ */
1410
+ supportedTypes?: string[];
1411
+ /**
1412
+ * 导出文件
1413
+ * @description
1414
+ */
1415
+ exportFile: (type: string) => Promise<void>;
1416
+ }
1417
+
1418
+ export declare interface EditorFontFace {
1151
1419
  /**
1152
1420
  * 字体的名称,用于在用户界面上显示的名称
1153
1421
  */
@@ -1173,7 +1441,7 @@ declare interface EditorFontFace {
1173
1441
  /**
1174
1442
  * 字体元数据
1175
1443
  */
1176
- declare interface EditorFontMeta {
1444
+ export declare interface EditorFontMeta {
1177
1445
  head: {
1178
1446
  unitsPerEm: number;
1179
1447
  };
@@ -1207,10 +1475,28 @@ declare interface EditorFontMeta {
1207
1475
  };
1208
1476
  }
1209
1477
 
1478
+ /**
1479
+ * 字体列表
1480
+ */
1481
+ export declare interface EditorFontsList {
1482
+ /**
1483
+ * 返回解析为字体的列表的 Promise。
1484
+ */
1485
+ getAll: () => Promise<EditorFontFace[]>;
1486
+ }
1487
+
1488
+ export declare interface EditorFontsOptions {
1489
+ /**
1490
+ * 服务器字体列表,用于获取服务器端配置的字体列表,
1491
+ * 并提供可用于字体的加载 URL 和字体元数据。
1492
+ */
1493
+ list: EditorFontsList;
1494
+ }
1495
+
1210
1496
  /**
1211
1497
  * i18n 相关设置
1212
1498
  */
1213
- declare interface EditorI18nOptions {
1499
+ export declare interface EditorI18nOptions {
1214
1500
  /**
1215
1501
  * 语言,默认使用浏览器当前环境中的语言
1216
1502
  */
@@ -1221,12 +1507,12 @@ declare interface EditorI18nOptions {
1221
1507
  direction?: 'ltr' | 'rtl';
1222
1508
  }
1223
1509
 
1224
- declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'center' | 'east' | 'sw' | 'south' | 'se';
1510
+ export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'center' | 'east' | 'sw' | 'south' | 'se';
1225
1511
 
1226
1512
  /**
1227
1513
  * 链接配置,抽象打开链接等操作
1228
1514
  */
1229
- declare interface EditorLinkOptions {
1515
+ export declare interface EditorLinkOptions {
1230
1516
  /**
1231
1517
  * 打开链接,如果取消了打开链接操作,返回 false
1232
1518
  * @param url
@@ -1236,10 +1522,20 @@ declare interface EditorLinkOptions {
1236
1522
  open: (url: string, target: string) => Promise<boolean>;
1237
1523
  }
1238
1524
 
1525
+ /**
1526
+ * 可上传文件
1527
+ */
1528
+ export declare interface EditorLocalUploadableFile extends EditorBaseUploadableFile {
1529
+ name: string;
1530
+ size: number;
1531
+ mime: string;
1532
+ raw: File;
1533
+ }
1534
+
1239
1535
  /**
1240
1536
  * 菜单栏自定义按钮配置
1241
1537
  */
1242
- declare type EditorMenuCustomButton = {
1538
+ export declare type EditorMenuCustomButton = {
1243
1539
  /**
1244
1540
  * 按钮名称
1245
1541
  */
@@ -1282,7 +1578,7 @@ declare type EditorMenuCustomButton = {
1282
1578
  /**
1283
1579
  * 菜单栏二级以下的菜单入口
1284
1580
  */
1285
- declare interface EditorMenuEntryButton {
1581
+ export declare interface EditorMenuEntryButton<TName extends string> {
1286
1582
  type: 'entry';
1287
1583
  /**
1288
1584
  * 菜单名称
@@ -1292,13 +1588,17 @@ declare interface EditorMenuEntryButton {
1292
1588
  * 菜单图标
1293
1589
  */
1294
1590
  icon?: string;
1591
+ /**
1592
+ * 下一级子菜单
1593
+ */
1594
+ children?: Array<EditorMenuFeatureButton<TName> | EditorMenuEntryButton<TName>>[];
1295
1595
  }
1296
1596
 
1297
1597
  /**
1298
1598
  * 菜单栏一级菜单配置,此处用于定义一级菜单的操作入口,
1299
1599
  * 一级菜单在鼠标悬停时展示二级列表
1300
1600
  */
1301
- declare interface EditorMenuEntryConfig<TName extends string> {
1601
+ export declare interface EditorMenuEntryConfig<TName extends string> {
1302
1602
  /**
1303
1603
  * 一级菜单名称
1304
1604
  */
@@ -1308,13 +1608,17 @@ declare interface EditorMenuEntryConfig<TName extends string> {
1308
1608
  * 将第一层数组中的所有按钮放到一个区域内用分隔符隔开,
1309
1609
  * 第二层数组为按钮的定义,可以是功能按钮也可以是一个下拉入口。
1310
1610
  */
1311
- children: Array<EditorMenuFeatureButton<TName> | EditorMenuEntryButton>[];
1611
+ children: Array<EditorMenuFeatureButton<TName> | EditorMenuEntryButton<TName>>[];
1612
+ /**
1613
+ * 是否隐藏一级菜单
1614
+ */
1615
+ type?: 'hidden';
1312
1616
  }
1313
1617
 
1314
1618
  /**
1315
1619
  * 菜单栏功能按钮配置
1316
1620
  */
1317
- declare type EditorMenuFeatureButton<TName extends string> = {
1621
+ export declare type EditorMenuFeatureButton<TName extends string> = {
1318
1622
  /**
1319
1623
  * 隐藏按钮,用作在需要隐藏菜单栏时定义
1320
1624
  */
@@ -1342,17 +1646,17 @@ declare type EditorMenuFeatureButton<TName extends string> = {
1342
1646
  /**
1343
1647
  * 菜单栏按钮配置
1344
1648
  */
1345
- declare type EditorMenuFeatureButtonConfig<TName extends string> = Record<TName, EditorMenuFeatureButton<TName>>;
1649
+ export declare type EditorMenuFeatureButtonConfig<TName extends string> = Record<TName, EditorMenuFeatureButton<TName>>;
1346
1650
 
1347
1651
  /**
1348
1652
  * 菜单栏相关配置,目前菜单栏不是所有套件都支持,
1349
1653
  * 菜单栏是指的编辑器最上放可以展开二级菜单的那一栏。
1350
1654
  */
1351
- declare interface EditorMenuOptions<TName extends string> {
1655
+ export declare interface EditorMenuOptions<TName extends string> {
1352
1656
  /**
1353
- * 菜单栏是否显示
1657
+ * 菜单栏是否隐藏
1354
1658
  */
1355
- visible?: boolean;
1659
+ hidden?: boolean;
1356
1660
  /**
1357
1661
  * 是否禁用菜单栏所有功能
1358
1662
  */
@@ -1374,7 +1678,7 @@ declare interface EditorMenuOptions<TName extends string> {
1374
1678
  /**
1375
1679
  * 编辑器基础模式接口
1376
1680
  */
1377
- declare interface EditorMode {
1681
+ export declare interface EditorMode {
1378
1682
  /**
1379
1683
  * 获取当前编辑器模式
1380
1684
  */
@@ -1393,7 +1697,7 @@ declare interface EditorMode {
1393
1697
  /**
1394
1698
  * 编辑器初始化的时相关的模式配置
1395
1699
  */
1396
- declare type EditorModeOptions = {
1700
+ export declare type EditorModeOptions = {
1397
1701
  type: 'standard';
1398
1702
  /**
1399
1703
  * 当 mode 为 `standard` 时,可以设置当前编辑器的权限模式
@@ -1411,12 +1715,12 @@ declare type EditorModeOptions = {
1411
1715
  * - `preview` 预览模式,只能查看内容
1412
1716
  * - `presentation` 演示模式,用作演示场景,演示模式下部分套件可以进行一些简单的编辑操作
1413
1717
  */
1414
- declare type EditorModeType = 'standard' | 'preview' | 'presentation';
1718
+ export declare type EditorModeType = 'standard' | 'preview' | 'presentation';
1415
1719
 
1416
1720
  /**
1417
1721
  * 编辑器初始化通用参数
1418
1722
  */
1419
- declare interface EditorOptions {
1723
+ export declare interface EditorOptions {
1420
1724
  /**
1421
1725
  * 编辑器初始化内容,可以是 string 或者 ArrayBuffer,
1422
1726
  * 也可以通过异步 Promise 加载
@@ -1430,6 +1734,10 @@ declare interface EditorOptions {
1430
1734
  * 当前操作编辑器的用户信息
1431
1735
  */
1432
1736
  user?: EditorUserOptions;
1737
+ /**
1738
+ * 匿名用户的缺省信息
1739
+ */
1740
+ anonymous?: EditorAnonymousOptions;
1433
1741
  /**
1434
1742
  * i18n 相关设置
1435
1743
  */
@@ -1438,10 +1746,6 @@ declare interface EditorOptions {
1438
1746
  * 品牌相关设置
1439
1747
  */
1440
1748
  brand?: EditorBrandOptions;
1441
- /**
1442
- * 工具栏相关设置
1443
- */
1444
- toolbar?: EditorToolbarOptions;
1445
1749
  /**
1446
1750
  * 编辑器内部资源请求配置
1447
1751
  */
@@ -1466,12 +1770,20 @@ declare interface EditorOptions {
1466
1770
  * 编辑器评论设置
1467
1771
  */
1468
1772
  comments?: EditorCommentsOptions;
1773
+ /**
1774
+ * 附件设置
1775
+ */
1776
+ attachment?: EditorAttachmentOptions;
1777
+ /**
1778
+ * 导出设置
1779
+ */
1780
+ export?: EditorExportOptions;
1469
1781
  }
1470
1782
 
1471
1783
  /**
1472
1784
  * 大纲目录接口
1473
1785
  */
1474
- declare interface EditorOutline<Content = unknown> {
1786
+ export declare interface EditorOutline<Content = unknown> {
1475
1787
  /**
1476
1788
  * 设置大纲目录是否可见
1477
1789
  * @param visible 是否可见
@@ -1499,7 +1811,7 @@ declare interface EditorOutline<Content = unknown> {
1499
1811
  /**
1500
1812
  * 大纲目录项条目
1501
1813
  */
1502
- declare interface EditorOutlineItem<Content = unknown> {
1814
+ export declare interface EditorOutlineItem<Content = unknown> {
1503
1815
  /**
1504
1816
  * 目录项 ID
1505
1817
  */
@@ -1518,7 +1830,7 @@ declare interface EditorOutlineItem<Content = unknown> {
1518
1830
  * 大纲目录初始化参数,
1519
1831
  * 用于配置大纲目录的行为和外观。
1520
1832
  */
1521
- declare interface EditorOutlineOptions {
1833
+ export declare interface EditorOutlineOptions {
1522
1834
  /**
1523
1835
  * 初始化编辑器时是否显示大纲目录,
1524
1836
  * 默认为 false。
@@ -1529,7 +1841,7 @@ declare interface EditorOutlineOptions {
1529
1841
  /**
1530
1842
  * 编辑器打印设置
1531
1843
  */
1532
- declare interface EditorPrintOptions {
1844
+ export declare interface EditorPrintOptions {
1533
1845
  /**
1534
1846
  * 部分套件如果绕过了编辑器预设的打印接口,直接通过拉起了浏览器的打印页面,这时打印页面无法获取到编辑器的内容,
1535
1847
  * 这种情况下就会 fallback 到这个 options 上,显示一个提示信息。
@@ -1543,10 +1855,21 @@ declare interface EditorPrintOptions {
1543
1855
  disabled?: boolean;
1544
1856
  }
1545
1857
 
1858
+ /**
1859
+ * 远程文件上传
1860
+ */
1861
+ export declare interface EditorRemoteUploadableFile extends EditorBaseUploadableFile {
1862
+ src: string;
1863
+ name?: never;
1864
+ size?: never;
1865
+ mime?: never;
1866
+ raw?: never;
1867
+ }
1868
+
1546
1869
  /**
1547
1870
  * 编辑器通用接口
1548
1871
  */
1549
- declare abstract class EditorSDK {
1872
+ export declare abstract class EditorSDK {
1550
1873
  protected options: EditorOptions;
1551
1874
  constructor(options: EditorOptions);
1552
1875
  /**
@@ -1587,13 +1910,62 @@ declare abstract class EditorSDK {
1587
1910
  * - `viewer` 阅读模式
1588
1911
  * - `reviewer` 评论模式
1589
1912
  */
1590
- declare type EditorStandardRole = 'editor' | 'viewer' | 'reviewer';
1913
+ export declare type EditorStandardRole = 'editor' | 'viewer' | 'reviewer';
1914
+
1915
+ /**
1916
+ * 上传任务回调
1917
+ */
1918
+ export declare interface EditorTaskCallbacks {
1919
+ /**
1920
+ * 上传进度回调
1921
+ * @param taskId
1922
+ * @param loaded
1923
+ * @param total
1924
+ * @param progress
1925
+ * @param data
1926
+ * @returns
1927
+ */
1928
+ onProgress?: (taskId: string, loaded: number, total: number, progress: number, data?: unknown) => void;
1929
+ /**
1930
+ * 上传错误回调
1931
+ * @param taskId
1932
+ * @param error
1933
+ * @returns
1934
+ */
1935
+ onError?: (taskId: string, error: Error) => void;
1936
+ /**
1937
+ * 上传暂停回调
1938
+ * @param taskId
1939
+ * @returns
1940
+ */
1941
+ onPause?: (taskId: string) => void;
1942
+ /**
1943
+ * 上传取消
1944
+ * @param taskId
1945
+ * @returns
1946
+ */
1947
+ onAbort?: (taskId: string) => void;
1948
+ /**
1949
+ * 上传恢复
1950
+ * @param taskId
1951
+ * @returns
1952
+ */
1953
+ onResume?: (taskId: string) => void;
1954
+ /**
1955
+ * 上传完成回调
1956
+ * @param taskId
1957
+ * @param status
1958
+ * @param data
1959
+ * @returns
1960
+ */
1961
+ onEnd?: (taskId: string, status: 'Error' | 'Finished' | 'Canceled', data: unknown) => void;
1962
+ }
1591
1963
 
1592
1964
  /**
1593
1965
  * 文本格式接口,
1594
1966
  * 包括设置、读取选区内文本的 BIUS、family、大小、颜色等
1595
1967
  */
1596
- declare interface EditorText<Color = string, TRangeValue = unknown> {
1968
+ export declare interface EditorText<Color = string, TRangeValue = unknown> {
1597
1969
  /**
1598
1970
  * 获取当前选区或指定选区内的文本格式状态
1599
1971
  */
@@ -1617,7 +1989,7 @@ declare interface EditorText<Color = string, TRangeValue = unknown> {
1617
1989
  /**
1618
1990
  * 文本格式状态
1619
1991
  */
1620
- declare interface EditorTextFormat<Color = string> {
1992
+ export declare interface EditorTextFormat<Color = string> {
1621
1993
  /**
1622
1994
  * 粗体
1623
1995
  */
@@ -1655,7 +2027,7 @@ declare interface EditorTextFormat<Color = string> {
1655
2027
  /**
1656
2028
  * 文本格式初始化选项
1657
2029
  */
1658
- declare interface EditorTextOptions<Color = string> {
2030
+ export declare interface EditorTextOptions<Color = string> {
1659
2031
  /**
1660
2032
  * 当前编辑器默认的文本格式
1661
2033
  */
@@ -1665,7 +2037,7 @@ declare interface EditorTextOptions<Color = string> {
1665
2037
  /**
1666
2038
  * 工具栏自定义按钮配置
1667
2039
  */
1668
- declare interface EditorToolbarCustomButton extends Omit<EditorToolbarFeatureButton, 'name'> {
2040
+ export declare interface EditorToolbarCustomButton extends Omit<EditorToolbarFeatureButton, 'name'> {
1669
2041
  /**
1670
2042
  * 自定义按钮名称
1671
2043
  */
@@ -1683,7 +2055,7 @@ declare interface EditorToolbarCustomButton extends Omit<EditorToolbarFeatureBut
1683
2055
  /**
1684
2056
  * 工具栏自定义按钮配置
1685
2057
  */
1686
- declare interface EditorToolbarCustomButtonConfig {
2058
+ export declare interface EditorToolbarCustomButtonConfig {
1687
2059
  /**
1688
2060
  * 按钮配置
1689
2061
  */
@@ -1693,11 +2065,11 @@ declare interface EditorToolbarCustomButtonConfig {
1693
2065
  /**
1694
2066
  * 工具栏内置功能按钮配置
1695
2067
  */
1696
- declare interface EditorToolbarFeatureButton {
2068
+ export declare interface EditorToolbarFeatureButton<ToolButtonName extends string = EditorToolbarFeatureButtonName> {
1697
2069
  /**
1698
2070
  * 按钮类型
1699
2071
  */
1700
- name: EditorToolbarFeatureButtonName;
2072
+ name: ToolButtonName;
1701
2073
  /**
1702
2074
  * 按钮标签(显示文本)
1703
2075
  */
@@ -1706,6 +2078,10 @@ declare interface EditorToolbarFeatureButton {
1706
2078
  * 按钮图标,可以是 base64 的图片信息,也可以是图片 url
1707
2079
  */
1708
2080
  icon?: string;
2081
+ /**
2082
+ * 按钮是否隐藏
2083
+ */
2084
+ hidden?: boolean;
1709
2085
  /**
1710
2086
  * 按钮是否禁用
1711
2087
  */
@@ -1719,14 +2095,14 @@ declare interface EditorToolbarFeatureButton {
1719
2095
  /**
1720
2096
  * 工具栏内置功能按钮配置
1721
2097
  */
1722
- declare type EditorToolbarFeatureButtonConfig = {
1723
- [key in EditorToolbarFeatureButtonName]?: EditorToolbarFeatureButton;
2098
+ export declare type EditorToolbarFeatureButtonConfig<ToolButtonName extends string> = {
2099
+ [key in ToolButtonName]?: EditorToolbarFeatureButton<ToolButtonName>;
1724
2100
  };
1725
2101
 
1726
2102
  /**
1727
2103
  * 工具栏内置功能按钮
1728
2104
  */
1729
- declare type EditorToolbarFeatureButtonName =
2105
+ export declare type EditorToolbarFeatureButtonName =
1730
2106
  /**
1731
2107
  * 加粗
1732
2108
  */
@@ -1759,11 +2135,11 @@ declare type EditorToolbarFeatureButtonName =
1759
2135
  /**
1760
2136
  * 工具栏相关设置,可以控制工具栏的显示内容
1761
2137
  */
1762
- declare interface EditorToolbarOptions {
2138
+ export declare interface EditorToolbarOptions<ToolButtonName extends string = EditorToolbarFeatureButtonName> {
1763
2139
  /**
1764
2140
  * 控制工具栏显隐状态
1765
2141
  */
1766
- visible?: boolean;
2142
+ hidden?: boolean;
1767
2143
  /**
1768
2144
  * 是否禁用工具栏所有功能
1769
2145
  */
@@ -1771,17 +2147,58 @@ declare interface EditorToolbarOptions {
1771
2147
  /**
1772
2148
  * 现有按钮的功能配置
1773
2149
  */
1774
- features?: EditorToolbarFeatureButtonConfig;
2150
+ features?: EditorToolbarFeatureButtonConfig<ToolButtonName>;
1775
2151
  /**
1776
2152
  * 自定义按钮
1777
2153
  */
1778
2154
  custom?: EditorToolbarCustomButtonConfig;
1779
2155
  }
1780
2156
 
2157
+ export declare type EditorUploadableFile = EditorLocalUploadableFile;
2158
+
2159
+ /**
2160
+ * 文件开始上传入参
2161
+ */
2162
+ export declare interface EditorUploadStartOptions extends EditorUploadTaskCallbacks {
2163
+ files: EditorUploadableFile[];
2164
+ }
2165
+
2166
+ /**
2167
+ * 上传状态
2168
+ */
2169
+ export declare enum EditorUploadStatus {
2170
+ Waiting = "Waiting",
2171
+ Uploading = "Uploading",
2172
+ Paused = "Paused",
2173
+ Canceled = "Canceled",
2174
+ Error = "Error",
2175
+ Finished = "Finished"
2176
+ }
2177
+
2178
+ export declare type EditorUploadTaskCallbacks = Omit<EditorTaskCallbacks, 'onEnd'> & {
2179
+ onLoadend: (results: {
2180
+ taskId: string;
2181
+ status: 'Error' | 'Finished' | 'Canceled';
2182
+ data?: unknown;
2183
+ }[]) => void;
2184
+ };
2185
+
2186
+ /**
2187
+ * 上传任务信息
2188
+ */
2189
+ export declare interface EditorUploadTaskInfo {
2190
+ taskId: string;
2191
+ fileInfo: EditorUploadableFile;
2192
+ total: number;
2193
+ readonly loaded: number;
2194
+ readonly progress: number;
2195
+ readonly status: EditorUploadStatus;
2196
+ }
2197
+
1781
2198
  /**
1782
2199
  * 操作当前编辑器的用户信息
1783
2200
  */
1784
- declare interface EditorUserOptions {
2201
+ export declare interface EditorUserOptions {
1785
2202
  /**
1786
2203
  * 用户 ID,用于标识用户
1787
2204
  */
@@ -1794,12 +2211,16 @@ declare interface EditorUserOptions {
1794
2211
  * 用户头像
1795
2212
  */
1796
2213
  avatar?: string;
2214
+ /**
2215
+ * 用户默认头像,当用户未设置头像时显示
2216
+ */
2217
+ defaultAvatar?: string;
1797
2218
  }
1798
2219
 
1799
2220
  /**
1800
2221
  * 编辑器外部水印信息
1801
2222
  */
1802
- declare interface EditorWatermarkOptions {
2223
+ export declare interface EditorWatermarkOptions {
1803
2224
  /**
1804
2225
  * 获取用作初始化使用的默认水印
1805
2226
  */
@@ -1811,7 +2232,7 @@ declare interface EditorWatermarkOptions {
1811
2232
  required?: boolean;
1812
2233
  }
1813
2234
 
1814
- declare type EditorWatermarkResource = {
2235
+ export declare type EditorWatermarkResource = {
1815
2236
  type: 'data-url';
1816
2237
  url: string;
1817
2238
  } | {
@@ -1822,18 +2243,18 @@ declare type EditorWatermarkResource = {
1822
2243
  /**
1823
2244
  * 请求、响应头
1824
2245
  */
1825
- declare type HTTPHeaders = Record<string, string | number | boolean | undefined>;
2246
+ export declare type HTTPHeaders = Record<string, string | number | boolean | undefined>;
1826
2247
 
1827
2248
  /**
1828
2249
  * 请求方法
1829
2250
  */
1830
- declare type HTTPMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH';
2251
+ export declare type HTTPMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH';
1831
2252
 
1832
2253
  /**
1833
2254
  * HTTP 代理,用于抽象 HTTP 请求,
1834
2255
  * 将请求代理编辑器外部
1835
2256
  */
1836
- declare interface HTTPProxy {
2257
+ export declare interface HTTPProxy {
1837
2258
  /**
1838
2259
  * 发送请求,如果需要做请求、响应拦截,需要在 proxy.interceptors 中实现,
1839
2260
  * 套件内使用 proxy 发送请求的方式应该为类似如下方式:
@@ -1880,7 +2301,7 @@ declare interface HTTPProxy {
1880
2301
  /**
1881
2302
  * 请求配置
1882
2303
  */
1883
- declare interface HTTPRequestConfig<Data = unknown> {
2304
+ export declare interface HTTPRequestConfig<Data = unknown> {
1884
2305
  /**
1885
2306
  * 请求地址
1886
2307
  */
@@ -1906,7 +2327,7 @@ declare interface HTTPRequestConfig<Data = unknown> {
1906
2327
  /**
1907
2328
  * 响应数据
1908
2329
  */
1909
- declare interface HTTPResponse<Data = unknown> {
2330
+ export declare interface HTTPResponse<Data = unknown> {
1910
2331
  /**
1911
2332
  * 响应数据 body
1912
2333
  */
@@ -1924,8 +2345,8 @@ declare interface HTTPResponse<Data = unknown> {
1924
2345
  /**
1925
2346
  * 请求返回类型
1926
2347
  */
1927
- declare type HTTPResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
2348
+ export declare type HTTPResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
1928
2349
 
1929
- declare type MaybePromiseValue<T> = T | Promise<T>;
2350
+ export declare type MaybePromiseValue<T> = T | Promise<T>;
1930
2351
 
1931
2352
  export { }