@officesdk/editor-sdk-core 0.0.0-alpha.8 → 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 (112) 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/base-types.js +1 -1
  26. package/cjs/shared/theme/components/dropdown.js +1 -1
  27. package/cjs/shared/theme/components/index.js +2 -1
  28. package/cjs/shared/theme/components/input.js +1 -1
  29. package/cjs/shared/theme/components/menu.js +3 -0
  30. package/cjs/shared/theme/components/slider.js +1 -1
  31. package/cjs/shared/theme/components/tab.js +1 -1
  32. package/cjs/shared/theme/components/toast.js +1 -1
  33. package/cjs/shared/theme/components/toolbar-button.js +1 -1
  34. package/cjs/shared/theme/components/tooltip.js +1 -1
  35. package/cjs/shared/theme/index.js +1 -1
  36. package/cjs/shared/toolbar.js +1 -1
  37. package/cjs/shared/version.js +1 -1
  38. package/cjs/sheet/form.js +1 -1
  39. package/cjs/sheet/history.js +1 -1
  40. package/cjs/sheet/index.js +1 -1
  41. package/cjs/sheet/render.js +1 -1
  42. package/cjs/sheet/sdk.js +1 -1
  43. package/cjs/sheet/sheet-tab.js +1 -1
  44. package/cjs/table/field.js +1 -1
  45. package/cjs/table/history.js +1 -1
  46. package/cjs/table/index.js +1 -1
  47. package/cjs/table/record.js +3 -0
  48. package/cjs/table/sdk.js +1 -1
  49. package/cjs/table/snapshot.js +1 -1
  50. package/cjs/table/view.js +1 -1
  51. package/esm/docs/comments.js +2 -0
  52. package/esm/docs/discuss.js +2 -0
  53. package/esm/docs/index.js +1 -1
  54. package/esm/docs/outline.js +2 -0
  55. package/esm/docs/sdk.js +1 -1
  56. package/esm/docs/sidebar.js +2 -0
  57. package/esm/docs/theme.js +2 -0
  58. package/esm/docx/sdk.js +1 -1
  59. package/esm/docx/theme.js +1 -1
  60. package/esm/form/sdk.js +1 -1
  61. package/esm/form/ui.js +1 -1
  62. package/esm/presentation/index.js +1 -1
  63. package/esm/presentation/sdk.js +1 -1
  64. package/esm/presentation/slide-theme.js +2 -0
  65. package/esm/presentation/theme.js +1 -1
  66. package/esm/shared/attachment.js +10 -2
  67. package/esm/shared/editor.js +1 -1
  68. package/esm/shared/file-picker.js +1 -1
  69. package/esm/shared/fonts.js +15 -2
  70. package/esm/shared/history.js +1 -1
  71. package/esm/shared/http.js +1 -1
  72. package/esm/shared/i18n.js +1 -1
  73. package/esm/shared/index.js +2 -1
  74. package/esm/shared/spell-check.js +2 -0
  75. package/esm/shared/theme/base-types.js +1 -1
  76. package/esm/shared/theme/components/dropdown.js +1 -1
  77. package/esm/shared/theme/components/index.js +2 -1
  78. package/esm/shared/theme/components/input.js +1 -1
  79. package/esm/shared/theme/components/menu.js +2 -0
  80. package/esm/shared/theme/components/slider.js +1 -1
  81. package/esm/shared/theme/components/tab.js +1 -1
  82. package/esm/shared/theme/components/toast.js +1 -1
  83. package/esm/shared/theme/components/toolbar-button.js +1 -1
  84. package/esm/shared/theme/components/tooltip.js +1 -1
  85. package/esm/shared/theme/index.js +1 -1
  86. package/esm/shared/toolbar.js +1 -1
  87. package/esm/shared/version.js +1 -1
  88. package/esm/sheet/form.js +1 -1
  89. package/esm/sheet/history.js +1 -1
  90. package/esm/sheet/index.js +1 -1
  91. package/esm/sheet/render.js +1 -1
  92. package/esm/sheet/sdk.js +1 -1
  93. package/esm/sheet/sheet-tab.js +1 -1
  94. package/esm/table/field.js +1 -1
  95. package/esm/table/history.js +1 -1
  96. package/esm/table/index.js +1 -1
  97. package/esm/table/record.js +2 -0
  98. package/esm/table/sdk.js +1 -1
  99. package/esm/table/snapshot.js +1 -1
  100. package/esm/table/view.js +1 -1
  101. package/package.json +1 -1
  102. package/types/combine.d.ts +975 -115
  103. package/types/diagram.d.ts +520 -82
  104. package/types/docs.d.ts +718 -78
  105. package/types/docx.d.ts +522 -84
  106. package/types/form.d.ts +529 -89
  107. package/types/mindmap.d.ts +520 -82
  108. package/types/pdf.d.ts +520 -82
  109. package/types/presentation.d.ts +599 -89
  110. package/types/shared.d.ts +520 -82
  111. package/types/sheet.d.ts +579 -105
  112. package/types/table.d.ts +632 -82
@@ -1,3 +1,17 @@
1
+ /**
2
+ * 编辑文件检查器
3
+ */
4
+ export declare abstract class AbstractedEditorFileChecker {
5
+ /**
6
+ * 检查文件是否符合限制
7
+ * @param files
8
+ * @returns 返回符合的files
9
+ */
10
+ check?: (files: EditorPickedFile[], options?: {
11
+ type: 'image' | 'video' | 'audio' | 'attachment';
12
+ }) => EditorPickedFile[];
13
+ }
14
+
1
15
  export declare abstract class AbstractedEditorFileUploader {
2
16
  /**
3
17
  * 开始上传
@@ -113,6 +127,12 @@ export declare interface BorderColors {
113
127
  disabled: string;
114
128
  }
115
129
 
130
+ export declare interface BorderConfig {
131
+ color?: string;
132
+ radius?: string;
133
+ width?: string;
134
+ }
135
+
116
136
  /** 圆角配置 */
117
137
  export declare interface BorderRadiusConfig {
118
138
  /** 无圆角 0px */
@@ -169,6 +189,8 @@ export declare interface ButtonBaseSizeStyles {
169
189
  borderRadius: string;
170
190
  /** 字重 */
171
191
  fontWeight: string | number;
192
+ /** 间距 */
193
+ gap?: string;
172
194
  }
173
195
 
174
196
  /** Button 完整配置 */
@@ -376,12 +398,16 @@ export declare interface CommonThemeConfig {
376
398
  radio: RadioConfig;
377
399
  /** 复选框 */
378
400
  checkbox: CheckboxConfig;
401
+ /** 下拉框 */
402
+ dropdown: DropdownConfig;
403
+ /** 下拉框按钮 */
404
+ dropdownButton: DropdownButtonConfig;
405
+ /** 菜单 */
406
+ menu: MenuConfig;
379
407
  /** 开关 */
380
408
  switch: SwitchConfig;
381
409
  /** 按钮 */
382
410
  button: ButtonConfig;
383
- /** 下拉框 */
384
- dropdown: DropdownConfig;
385
411
  /** 标签页 */
386
412
  tab: TabConfig;
387
413
  /** 滑块 */
@@ -449,82 +475,65 @@ export declare interface DecorateColors {
449
475
  april: string;
450
476
  }
451
477
 
452
- /** Dropdown 箭头图标配置 */
453
- export declare interface DropdownArrowIconConfig extends IconConfig {
454
- /** 展开状态旋转角度 */
455
- expandedRotateAngel: string;
456
- }
457
-
458
- /** Dropdown 完整配置 */
459
- export declare interface DropdownConfig {
460
- /** 图标配置集合 */
461
- icons: DropdownIconsConfig;
462
- /** 普通下拉框(按钮触发器) */
463
- button: DropdownVariantStyles;
464
- /** 输入框下拉框(输入框触发器) */
465
- input: DropdownVariantStyles;
466
- /** 大尺寸配置 */
467
- large: DropdownSizeStyles;
468
- }
469
-
470
- /** Dropdown 图标集合配置 */
471
- export declare interface DropdownIconsConfig {
472
- /** 下拉箭头图标 */
473
- arrow: DropdownArrowIconConfig;
474
- /** 选中图标 */
475
- check: IconConfig;
478
+ /** Dropdown 按钮配置 */
479
+ export declare interface DropdownButtonConfig {
480
+ /** 颜色 */
481
+ color: StateStyles;
482
+ /** 背景 */
483
+ background: StateStyles;
484
+ /** 无边框背景 */
485
+ frameLessBackground: StateStyles;
486
+ /** 边框颜色 */
487
+ borderColor: StateStyles;
488
+ /** 图标 */
489
+ icon: {
490
+ size: IconSize;
491
+ /** 透明度 */
492
+ opacity: StateStyles;
493
+ };
494
+ /** 指示器 */
495
+ indicator: IconConfig & {
496
+ /** 旋转角度 */
497
+ rotate: string;
498
+ /** 透明度 */
499
+ opacity: StateStyles;
500
+ };
501
+ /** 尺寸 */
502
+ size: {
503
+ /** 大尺寸 */
504
+ large: DropdownButtonSizeStyles;
505
+ /** 中尺寸 */
506
+ medium: DropdownButtonSizeStyles;
507
+ /** 小尺寸 */
508
+ small: DropdownButtonSizeStyles;
509
+ };
476
510
  }
477
511
 
478
- /** Dropdown 菜单项样式 */
479
- export declare interface DropdownMenuItemStyles extends Omit<BackgroundStateStyles, 'backgroundActive'> {
480
- /** 选中背景 */
481
- backgroundSelected: string;
482
- /** 文字颜色 */
483
- color: string;
484
- /** 禁用文字颜色 */
485
- colorDisabled: string;
486
- /** 菜单项内边距 */
512
+ /** Dropdown 按钮尺寸 */
513
+ export declare interface DropdownButtonSizeStyles {
487
514
  padding: string;
488
- }
489
-
490
- /** Dropdown 菜单容器样式 */
491
- export declare interface DropdownMenuStyles {
492
- /** 背景色 */
493
- background: string;
494
- /** 边框色 */
495
- borderColor: string;
496
- /** 圆角 */
515
+ fontSize: string;
516
+ height: string;
517
+ gap: string;
497
518
  borderRadius: string;
498
- /** 内边距 */
499
- padding: string;
500
- /** 阴影 */
501
- boxShadow: string;
502
- /** 最大高度 */
503
- maxHeight: string;
504
- }
505
-
506
- /** Dropdown 尺寸配置 */
507
- export declare interface DropdownSizeStyles extends ButtonBaseSizeStyles {
508
- /** 图标尺寸 */
509
519
  iconSize: IconSize;
520
+ indicatorSize: IconSize;
510
521
  }
511
522
 
512
- /** Dropdown 触发器样式(按钮或输入框触发器) */
513
- export declare interface DropdownTriggerStyles extends BorderStateStyles, BackgroundStateStyles, ShadowStateStyles {
514
- /** 文字颜色 */
515
- color: string;
516
- /** 禁用文字颜色 */
517
- colorDisabled: string;
518
- }
519
-
520
- /** Dropdown 变体样式 */
521
- export declare interface DropdownVariantStyles {
522
- /** 触发器样式 */
523
- trigger: DropdownTriggerStyles;
524
- /** 菜单容器样式 */
525
- menu: DropdownMenuStyles;
526
- /** 菜单项样式 */
527
- menuItem: DropdownMenuItemStyles;
523
+ /**
524
+ * Dropdown 下拉框配置
525
+ */
526
+ export declare interface DropdownConfig {
527
+ /** 阴影 */
528
+ boxShadow: string;
529
+ /** 内边距 */
530
+ padding: string;
531
+ /** 圆角 */
532
+ borderRadius: string;
533
+ /** 边框 */
534
+ border: string;
535
+ /** 背景 */
536
+ background: string;
528
537
  }
529
538
 
530
539
  /**
@@ -743,6 +752,10 @@ export declare interface EditorAttachmentOptions {
743
752
  * 附件选择器
744
753
  */
745
754
  picker?: EditorFilePicker;
755
+ /**
756
+ * 文件检查器
757
+ */
758
+ checker?: AbstractedEditorFileChecker;
746
759
  /**
747
760
  * 附件上传器
748
761
  */
@@ -1175,6 +1188,14 @@ export declare type EditorContextMenuOptions<TName extends string> = EditorMenuO
1175
1188
  */
1176
1189
  export declare type EditorCopyOptions = EditorLogicFeatureConfig;
1177
1190
 
1191
+ /**
1192
+ * 日期格式
1193
+ * - `YYYY/MM/DD` 年/月/日(简繁中文、韩语、日语默认)
1194
+ * - `MM/DD/YYYY` 月/日/年(英语默认)
1195
+ * - `DD/MM/YYYY` 日/月/年(其他语言默认)
1196
+ */
1197
+ export declare type EditorDateFormat = 'YYYY/MM/DD' | 'MM/DD/YYYY' | 'DD/MM/YYYY';
1198
+
1178
1199
  /**
1179
1200
  * 编辑器解密选项接口
1180
1201
  * 用于配置编辑器中需要解密的内容的相关选项
@@ -1352,11 +1373,31 @@ export declare interface EditorFilePicker {
1352
1373
  }
1353
1374
 
1354
1375
  export declare interface EditorFilePickerOpenOptions {
1376
+ /**
1377
+ * 文件类型限制
1378
+ */
1355
1379
  mimeTypes?: string[];
1380
+ /**
1381
+ * 最大文件尺寸限制
1382
+ */
1356
1383
  maxSize?: number;
1384
+ /**
1385
+ * 文件后缀限制
1386
+ */
1357
1387
  extensions?: string[];
1388
+ /**
1389
+ * 是否支持多选
1390
+ */
1358
1391
  multiple?: boolean;
1392
+ /**
1393
+ * 是否为选择文件夹
1394
+ */
1359
1395
  directory?: boolean;
1396
+ /**
1397
+ * 文件选择器接受的文件类型,如 'image/*' 表示接受所有图片文件
1398
+ * 如果指定了该配置,则不会再由extensions生成accept
1399
+ */
1400
+ accept?: string;
1360
1401
  }
1361
1402
 
1362
1403
  export declare interface EditorFollowMode {
@@ -1469,9 +1510,32 @@ export declare interface EditorFontsOptions {
1469
1510
  */
1470
1511
  list?: EditorFontsList;
1471
1512
  /**
1472
- * 是否只使用本地字体,如果为 true,则不会从服务器获取字体列表。
1513
+ * 字体列表中隐藏不可用的字体,包含外部传入的以及各套件内置的字体
1514
+ * 不可用的定义:非本地已安装且不支持下载
1515
+ */
1516
+ hideUnavailableFonts?: boolean;
1517
+ /**
1518
+ * 字体下载监听器注册函数,当字体状态发生变化时调用提供的回调函数。
1519
+ * 回调函数暂时没有参数,后续可以根据需要添加参数,例如提供变化的字体信息等。
1520
+ * @param listener
1521
+ * @returns
1473
1522
  */
1474
- useLocalFontsOnly?: boolean;
1523
+ registerFontLoadListener?: (listener: (options: FontLoadListenerOptions) => void) => void;
1524
+ /**
1525
+ * 下载字体的函数,接受字体族名称和一个可选的配置对象作为参数。
1526
+ * 配置对象可以包含以下回调函数:
1527
+ * - onProgress: 在下载过程中调用,提供下载进度(0 到 1 之间的数字)。
1528
+ * - onComplete: 在下载完成时调用。
1529
+ * - onError: 在下载过程中发生错误时调用,提供错误对象。
1530
+ * @param fontFamily
1531
+ * @param option
1532
+ * @returns
1533
+ */
1534
+ download?: (fontFamily: string, option?: {
1535
+ onProgress?: (progress: number) => void;
1536
+ onComplete?: () => void;
1537
+ onError?: (error: Error) => void;
1538
+ }) => void;
1475
1539
  }
1476
1540
 
1477
1541
  /**
@@ -1499,20 +1563,61 @@ export declare interface EditorHistory {
1499
1563
  hide: () => void;
1500
1564
  }
1501
1565
 
1502
- export declare type EditorHistoryOptions = EditorFeatureConfig;
1566
+ export declare interface EditorHistoryLimitations {
1567
+ /** 单个文件可还原的最近历史记录数量 */
1568
+ getHistoryLimitRevertNum?: () => number | undefined;
1569
+ /** 文件历史保留天数 */
1570
+ getHistoryLimitAllTime?: () => number | undefined;
1571
+ }
1572
+
1573
+ export declare type EditorHistoryOptions = EditorFeatureConfig & {
1574
+ limitations?: EditorHistoryLimitations;
1575
+ };
1503
1576
 
1504
1577
  /**
1505
1578
  * i18n 相关设置
1506
1579
  */
1507
1580
  export declare interface EditorI18nOptions {
1508
1581
  /**
1509
- * 语言,默认使用浏览器当前环境中的语言
1582
+ * 语言代码
1583
+ * 默认读取浏览器/设备语言并在支持的列表中匹配
1584
+ * 匹配规则:优先精确匹配,其次模糊匹配 language 部分,Fallback 为 en-US
1510
1585
  */
1511
- language?: string;
1586
+ language?: EditorLanguage;
1512
1587
  /**
1513
1588
  * 文本方向,默认根据语言自动适配
1514
1589
  */
1515
1590
  direction?: 'ltr' | 'rtl';
1591
+ /**
1592
+ * 时区设置(包含 ID、偏移量、标签)
1593
+ * 默认读取浏览器/设备时区,如无法匹配则根据语言推测
1594
+ * Fallback 为 { id: 'Europe/London', offset: 0, label: 'London' }
1595
+ */
1596
+ timezone?: EditorTimezoneInfo;
1597
+ /**
1598
+ * 日期格式
1599
+ * 默认根据语言自动匹配:
1600
+ * - 简繁中文、韩语、日语:YYYY/MM/DD
1601
+ * - 英语:MM/DD/YYYY
1602
+ * - 其他语言:DD/MM/YYYY
1603
+ * 用户手动设置后将保存并优先使用用户设置
1604
+ */
1605
+ dateFormat?: EditorDateFormat;
1606
+ /**
1607
+ * 时间格式
1608
+ * 默认使用 24 小时制
1609
+ * 注意:部分语言(如德语、法语、意大利语、俄语)不支持 12 小时制
1610
+ * 用户手动设置后将保存并优先使用用户设置
1611
+ */
1612
+ timeFormat?: EditorTimeFormat;
1613
+ /**
1614
+ * 周起始日
1615
+ * 默认根据语言自动匹配:
1616
+ * - 英语、阿拉伯语:星期日
1617
+ * - 其他语言:星期一
1618
+ * 用户手动设置后将保存并优先使用用户设置
1619
+ */
1620
+ weekStartDay?: EditorWeekStartDay;
1516
1621
  }
1517
1622
 
1518
1623
  export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'center' | 'east' | 'sw' | 'south' | 'se';
@@ -1557,6 +1662,27 @@ export declare interface EditorImportOptions {
1557
1662
  }>;
1558
1663
  }
1559
1664
 
1665
+ /**
1666
+ * 支持的语言代码
1667
+ * - `zh-CN` 简体中文
1668
+ * - `zh-TW` 繁体中文(含 zh-HK, zh-MO)
1669
+ * - `en-US` 英语
1670
+ * - `ja-JP` 日语
1671
+ * - `ko-KR` 韩语
1672
+ * - `es-ES` 西班牙语
1673
+ * - `pt-PT` 葡萄牙语
1674
+ * - `de-DE` 德语
1675
+ * - `fr-FR` 法语
1676
+ * - `it-IT` 意大利语
1677
+ * - `ru-RU` 俄语
1678
+ * - `id-ID` 印度尼西亚语
1679
+ * - `vi-VN` 越南语
1680
+ * - `th-TH` 泰语
1681
+ * - `ms-MY` 马来语
1682
+ * - `ar-SA` 阿拉伯语
1683
+ */
1684
+ 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';
1685
+
1560
1686
  /**
1561
1687
  * 链接配置,抽象打开链接等操作
1562
1688
  */
@@ -2106,7 +2232,11 @@ export declare interface EditorOptions {
2106
2232
  /**
2107
2233
  * 编辑器主题相关设置
2108
2234
  */
2109
- theme: EditorThemeOptions;
2235
+ theme?: EditorThemeOptions;
2236
+ /**
2237
+ * 编辑器拼写检查相关设置
2238
+ */
2239
+ spellCheck?: EditorSpellCheckOptions;
2110
2240
  }
2111
2241
 
2112
2242
  /**
@@ -2426,6 +2556,49 @@ export declare interface EditorSocket {
2426
2556
  connected: boolean;
2427
2557
  }
2428
2558
 
2559
+ export declare interface EditorSpellCheckDictionaryFileConfig {
2560
+ /** 词典文件的 aff 文件路径 */
2561
+ aff: string;
2562
+ /** 词典文件的 dic 文件路径 */
2563
+ dic: string;
2564
+ }
2565
+
2566
+ /**
2567
+ * 拼写检查相关配置
2568
+ */
2569
+ export declare interface EditorSpellCheckOptions extends EditorFeatureConfig {
2570
+ /**
2571
+ * 拼写检查功能配置
2572
+ */
2573
+ spellCheck?: {
2574
+ /**
2575
+ * 拼写检查功能是否被禁用
2576
+ */
2577
+ disabled?: boolean;
2578
+ /**
2579
+ * 拼写检查所需要的字典文件 CDN 域名
2580
+ */
2581
+ dictionaryCDNHost?: string;
2582
+ /**
2583
+ * 自定义拼写检查词典, 用于覆盖内置的默认词典
2584
+ */
2585
+ customDictionary?: Partial<Record<EditorLanguage, EditorSpellCheckDictionaryFileConfig>>;
2586
+ };
2587
+ /**
2588
+ * 语法检查功能配置
2589
+ */
2590
+ grammarCheck?: {
2591
+ /**
2592
+ * 语法检查功能是否被禁用
2593
+ */
2594
+ disabled?: boolean;
2595
+ /**
2596
+ * 拼写检查API的URL,必须使用绝对路径
2597
+ */
2598
+ url?: string;
2599
+ };
2600
+ }
2601
+
2429
2602
  /**
2430
2603
  * 编辑器在 `standard` 模式下的权限模式
2431
2604
  * - `editor` 编辑模式
@@ -2568,6 +2741,59 @@ export declare interface EditorThemeOptions<TExtensions = object> extends Common
2568
2741
  extensions?: TExtensions;
2569
2742
  }
2570
2743
 
2744
+ /**
2745
+ * 时间格式
2746
+ * - `24h` 24 小时制(默认)
2747
+ * - `12h` 12 小时制(部分语言不支持)
2748
+ */
2749
+ export declare type EditorTimeFormat = '24h' | '12h';
2750
+
2751
+ /**
2752
+ * 支持的时区 IANA ID
2753
+ *
2754
+ * 覆盖范围: UTC-12 到 UTC+12,共 34 个全球主要城市时区
2755
+ *
2756
+ * 注意事项:
2757
+ * - 所有时区 ID 均为 IANA 时区数据库标准标识符
2758
+ * - Etc/GMT+12 表示 UTC-12(Etc/GMT 时区符号与 UTC 相反)
2759
+ * - 不包括已弃用或非标准时区标识符
2760
+ *
2761
+ * @see https://www.iana.org/time-zones
2762
+ */
2763
+ 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';
2764
+
2765
+ /**
2766
+ * 时区信息
2767
+ */
2768
+ export declare interface EditorTimezoneInfo {
2769
+ /**
2770
+ * IANA 时区 ID
2771
+ *
2772
+ * 标准的 IANA 时区数据库标识符
2773
+ *
2774
+ * @example 'Asia/Shanghai', 'America/New_York', 'Europe/London'
2775
+ */
2776
+ id: EditorTimezoneId;
2777
+ /**
2778
+ * UTC 偏移量(小时,标准时间)
2779
+ *
2780
+ * - 正数:东半球,如 `8` 表示 UTC+8(北京)
2781
+ * - 负数:西半球,如 `-5` 表示 UTC-5(纽约标准时间)
2782
+ * - 零:格林威治标准时间
2783
+ *
2784
+ * 注意:此值为标准时间,不包含夏令时调整
2785
+ */
2786
+ offset: number;
2787
+ /**
2788
+ * 时区标签(英文)
2789
+ *
2790
+ * 用于 UI 显示的城市或地区名称
2791
+ *
2792
+ * @example 'Shanghai', 'New York', 'London'
2793
+ */
2794
+ label: string;
2795
+ }
2796
+
2571
2797
  /**
2572
2798
  * 工具栏功能按钮配置(包括内置按钮和自定义按钮)
2573
2799
  */
@@ -2631,6 +2857,16 @@ export declare interface EditorToolbarOptions<TName extends string> {
2631
2857
  * 如果不配置则按照套件的默认方式挂载。
2632
2858
  */
2633
2859
  container?: HTMLElement;
2860
+ /**
2861
+ * 工具栏样式
2862
+ * 各套件可自行扩展,目前支持背景色配置
2863
+ */
2864
+ style?: {
2865
+ /**
2866
+ * 背景色
2867
+ */
2868
+ backgroundColor?: string;
2869
+ };
2634
2870
  }
2635
2871
 
2636
2872
  /**
@@ -2844,9 +3080,11 @@ export declare interface EditorUserOptions {
2844
3080
  export declare interface EditorVersion {
2845
3081
  /**
2846
3082
  * 保存版本
2847
- * @param name 版本名称
3083
+ * @param options 版本名称
2848
3084
  */
2849
- createRevision: (name?: string) => void;
3085
+ createRevision: (options?: string | {
3086
+ name: string;
3087
+ }) => void;
2850
3088
  /**
2851
3089
  * 显示版本(侧边栏或其他形式)
2852
3090
  * 区别于历史侧边栏,在应用表格里表现为打开历史侧边栏切换到版本 tab
@@ -2859,7 +3097,14 @@ export declare interface EditorVersion {
2859
3097
  hide?: () => void;
2860
3098
  }
2861
3099
 
2862
- export declare type EditorVersionOptions = EditorFeatureConfig;
3100
+ export declare interface EditorVersionLimitations {
3101
+ /** 单个文件可保存/还原的版本(快照)数量 */
3102
+ getHistoryLimitVersionNum?: () => number | undefined;
3103
+ }
3104
+
3105
+ export declare type EditorVersionOptions = EditorFeatureConfig & {
3106
+ limitations?: EditorVersionLimitations;
3107
+ };
2863
3108
 
2864
3109
  /**
2865
3110
  * 编辑器外部水印信息
@@ -2889,6 +3134,13 @@ export declare type EditorWatermarkResource = {
2889
3134
  url: string;
2890
3135
  };
2891
3136
 
3137
+ /**
3138
+ * 周起始日
3139
+ * - `sunday` 星期日(英语、阿拉伯语默认)
3140
+ * - `monday` 星期一(其他语言默认)
3141
+ */
3142
+ export declare type EditorWeekStartDay = 'sunday' | 'monday';
3143
+
2892
3144
  export declare interface FileLinkParams {
2893
3145
  /**
2894
3146
  * 文件guid
@@ -2960,6 +3212,35 @@ export declare interface FontFamilyConfig {
2960
3212
  base: string;
2961
3213
  }
2962
3214
 
3215
+ /**
3216
+ * 字体下载事件类型
3217
+ */
3218
+ export declare enum FontLoadEventType {
3219
+ DownloadStart = "downloadStart",
3220
+ DownloadProgress = "downloadProgress",
3221
+ DownloadComplete = "downloadComplete",
3222
+ DownloadError = "downloadError"
3223
+ }
3224
+
3225
+ /**
3226
+ * 字体下载事件监听器参数,根据事件类型提供不同的属性
3227
+ */
3228
+ export declare type FontLoadListenerOptions = {
3229
+ type: FontLoadEventType.DownloadStart;
3230
+ id: string;
3231
+ } | {
3232
+ type: FontLoadEventType.DownloadComplete;
3233
+ id: string;
3234
+ } | {
3235
+ type: FontLoadEventType.DownloadProgress;
3236
+ id: string;
3237
+ progress: number;
3238
+ } | {
3239
+ type: FontLoadEventType.DownloadError;
3240
+ id: string;
3241
+ error: Error;
3242
+ };
3243
+
2963
3244
  /** 字号配置 */
2964
3245
  export declare interface FontSizeConfig {
2965
3246
  /** 超小字号 */
@@ -3094,6 +3375,16 @@ export declare interface HTTPProxy {
3094
3375
  * @returns
3095
3376
  */
3096
3377
  create: (id: string) => Promise<HTTPProxy>;
3378
+ /**
3379
+ * 凭证更新器,用于套件内部主动发起更新凭证操作
3380
+ * 例如:页面可见性发生变化时,在pull请求发起之前
3381
+ */
3382
+ credentials?: {
3383
+ /**
3384
+ * 更新凭证
3385
+ */
3386
+ update: () => Promise<void>;
3387
+ };
3097
3388
  }
3098
3389
 
3099
3390
  /**
@@ -3293,6 +3584,8 @@ export declare interface InputStateColorStyles {
3293
3584
  textColorNormal: string;
3294
3585
  /** 禁用文字颜色 */
3295
3586
  textColorDisabled: string;
3587
+ /** 只读文字颜色 */
3588
+ textColorReadOnly: string;
3296
3589
  }
3297
3590
 
3298
3591
  /** Input 状态样式配置 */
@@ -3375,6 +3668,102 @@ export declare interface MentionInfo {
3375
3668
  top?: number;
3376
3669
  }
3377
3670
 
3671
+ /** 菜单配置 */
3672
+ export declare interface MenuConfig {
3673
+ /** 菜单项配置 */
3674
+ menuItem: MenuItemConfig;
3675
+ /** 子菜单 */
3676
+ subMenu: {
3677
+ /** 子菜单弹出位置偏移 */
3678
+ popupOffset: number[];
3679
+ };
3680
+ /** 边框 */
3681
+ border: BorderConfig;
3682
+ /** 阴影 */
3683
+ boxShadow: Pick<StateStyles, 'normal' | 'hover'>;
3684
+ /** 分割线 */
3685
+ divider: {
3686
+ background: string;
3687
+ height: string;
3688
+ margin: string;
3689
+ };
3690
+ /** 分组标题 */
3691
+ groupTitle: {
3692
+ fontSize: string;
3693
+ fontWeight: string;
3694
+ color: string;
3695
+ };
3696
+ }
3697
+
3698
+ /** 菜单项配置 */
3699
+ export declare interface MenuItemConfig {
3700
+ /** 背景 */
3701
+ background: {
3702
+ normal: string;
3703
+ hover: string;
3704
+ active: string;
3705
+ disabled: string;
3706
+ };
3707
+ /** 边框 */
3708
+ border: BorderConfig;
3709
+ /** 布局 */
3710
+ layout: {
3711
+ /** 内边距 */
3712
+ padding: string;
3713
+ /** 间距 */
3714
+ gap: string;
3715
+ };
3716
+ /** 图标 */
3717
+ icon: {
3718
+ size: IconSize;
3719
+ };
3720
+ /** 标签 */
3721
+ label: {
3722
+ /** 颜色 */
3723
+ color: StateStyles;
3724
+ };
3725
+ /** 描述文本 */
3726
+ description: {
3727
+ /** 颜色 */
3728
+ color: StateStyles;
3729
+ };
3730
+ /** 激活图标 */
3731
+ activeIcon: {
3732
+ url: string;
3733
+ };
3734
+ /** 下一级菜单图标 */
3735
+ nextLevelIcon: {
3736
+ url: string;
3737
+ };
3738
+ /** 尺寸 */
3739
+ size: {
3740
+ /** 小尺寸 */
3741
+ small: MenuItemSizeStyles;
3742
+ /** 中尺寸 */
3743
+ medium: MenuItemSizeStyles;
3744
+ /** 大尺寸 */
3745
+ large: MenuItemSizeStyles;
3746
+ };
3747
+ }
3748
+
3749
+ /** 菜单项尺寸样式 */
3750
+ export declare interface MenuItemSizeStyles {
3751
+ label: {
3752
+ fontSize: string;
3753
+ maxWidth: string;
3754
+ };
3755
+ description: {
3756
+ fontSize: string;
3757
+ maxWidth: string;
3758
+ };
3759
+ activeIcon: {
3760
+ size: IconSize;
3761
+ };
3762
+ nextLevelIcon: {
3763
+ size: IconSize;
3764
+ };
3765
+ }
3766
+
3378
3767
  /**
3379
3768
  * 幻灯片可导出类型
3380
3769
  */
@@ -3632,6 +4021,7 @@ export declare interface SliderSizeStyles {
3632
4021
  thumbSize: string;
3633
4022
  /** 滑块偏移(距离边缘的间距) */
3634
4023
  thumbOffset: string;
4024
+ borderWidth: string;
3635
4025
  }
3636
4026
 
3637
4027
  /** Slider 滑块(圆点)样式 */
@@ -3646,6 +4036,8 @@ export declare interface SliderTrackStyles {
3646
4036
  backgroundDisabled: string;
3647
4037
  /** 已填充部分背景 */
3648
4038
  filledBackground: string;
4039
+ /** 已填充部分禁用状态背景 */
4040
+ filledBackgroundDisabled: string;
3649
4041
  /** 高度 */
3650
4042
  height: string;
3651
4043
  /** 宽度 */
@@ -3667,6 +4059,22 @@ export declare interface Speaker {
3667
4059
  avatar: string;
3668
4060
  }
3669
4061
 
4062
+ /** 通用状态样式 */
4063
+ export declare interface StateStyles {
4064
+ /** 默认颜色 */
4065
+ normal: string;
4066
+ /** 悬停文字颜色 */
4067
+ hover: string;
4068
+ /** 激活/聚焦文字颜色 */
4069
+ active: string;
4070
+ /** 禁用文字颜色 */
4071
+ disabled: string;
4072
+ /** 只读颜色 */
4073
+ readonly?: string;
4074
+ /** 错误颜色 */
4075
+ error?: string;
4076
+ }
4077
+
3670
4078
  /** Switch 完整配置 */
3671
4079
  export declare interface SwitchConfig {
3672
4080
  /** 关闭状态样式 */
@@ -3783,7 +4191,18 @@ export declare interface SyncStatusDelegation {
3783
4191
  /** Tab 完整配置 */
3784
4192
  export declare interface TabConfig {
3785
4193
  /** 线性标签页(仅下边框) */
3786
- line: TabVariantStyles;
4194
+ line: {
4195
+ backgroundColor: string;
4196
+ item: TabStateStyles & {
4197
+ /** 选中底部线条宽度/高度 */
4198
+ bottomActiveWidth: string;
4199
+ /** 选中底部线条圆角 */
4200
+ bottomActiveBorderRadius: string;
4201
+ /** 选中底部线条背景颜色 */
4202
+ bottomActiveBackgroundColor: string;
4203
+ };
4204
+ layout: TabLayoutStyles;
4205
+ };
3787
4206
  /** 面性标签页(带所有边框) */
3788
4207
  card: TabVariantStyles;
3789
4208
  /** 大尺寸配置 */
@@ -3807,8 +4226,10 @@ export declare interface TabStateStyles extends BackgroundStateStyles, BorderSta
3807
4226
  export declare interface TabVariantStyles {
3808
4227
  /** Tab 项状态样式 */
3809
4228
  item: TabStateStyles;
3810
- /** 布局样式 */
4229
+ /** 布局 */
3811
4230
  layout: TabLayoutStyles;
4231
+ /** tab条背景颜色 */
4232
+ backgroundColor: string;
3812
4233
  }
3813
4234
 
3814
4235
  /** Text Button 变体配置(在基础变体上扩展带背景色的引导样式) */
@@ -3889,6 +4310,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
3889
4310
  error: ToastVariantStyles;
3890
4311
  /** 警告提示样式 */
3891
4312
  warn: ToastVariantStyles;
4313
+ /** 严重警告样式 */
4314
+ critical: ToastVariantStyles;
4315
+ /** 加载提示样式 */
4316
+ loading: ToastVariantStyles;
3892
4317
  /** 偏移量 */
3893
4318
  offset: {
3894
4319
  /** 垂直偏移量 */
@@ -3896,6 +4321,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
3896
4321
  /** 水平偏移量 */
3897
4322
  horizontal: string;
3898
4323
  };
4324
+ /** 关闭按钮 */
4325
+ closeButton: {
4326
+ icon: Pick<IconConfig, 'url'>;
4327
+ };
3899
4328
  }
3900
4329
 
3901
4330
  /**
@@ -3967,6 +4396,11 @@ export declare interface ToastVariantStyles {
3967
4396
  borderColor: string;
3968
4397
  /** 图标配置 */
3969
4398
  icon: IconConfig;
4399
+ /** 消息 */
4400
+ message: {
4401
+ /** 颜色 */
4402
+ color: string;
4403
+ };
3970
4404
  }
3971
4405
 
3972
4406
  /** ToolbarButton 背景状态样式 */
@@ -4012,6 +4446,8 @@ export declare interface ToolbarButtonLayout {
4012
4446
  padding: string;
4013
4447
  /** 整体高度 */
4014
4448
  height: string;
4449
+ /** 整体圆角 */
4450
+ borderRadius: string;
4015
4451
  /** 内容布局 */
4016
4452
  content: {
4017
4453
  padding: string;
@@ -4106,6 +4542,8 @@ export declare interface TooltipStyleConfig {
4106
4542
  lineHeight: string;
4107
4543
  /** 字重 */
4108
4544
  fontWeight: number;
4545
+ /** 最大宽度 */
4546
+ maxWidth?: string;
4109
4547
  }
4110
4548
 
4111
4549
  /** Tooltip White 风格配置 */