@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
@@ -47,6 +47,20 @@ export declare abstract class AbstractedDiagramSDK {
47
47
  abstract get version(): EditorVersion | undefined;
48
48
  }
49
49
 
50
+ /**
51
+ * 编辑文件检查器
52
+ */
53
+ export declare abstract class AbstractedEditorFileChecker {
54
+ /**
55
+ * 检查文件是否符合限制
56
+ * @param files
57
+ * @returns 返回符合的files
58
+ */
59
+ check?: (files: EditorPickedFile[], options?: {
60
+ type: 'image' | 'video' | 'audio' | 'attachment';
61
+ }) => EditorPickedFile[];
62
+ }
63
+
50
64
  export declare abstract class AbstractedEditorFileUploader {
51
65
  /**
52
66
  * 开始上传
@@ -395,6 +409,8 @@ export declare interface CommonThemeConfig {
395
409
  checkbox: CheckboxConfig;
396
410
  /** 下拉框 */
397
411
  dropdown: DropdownConfig;
412
+ /** 下拉框按钮 */
413
+ dropdownButton: DropdownButtonConfig;
398
414
  /** 菜单 */
399
415
  menu: MenuConfig;
400
416
  /** 开关 */
@@ -514,6 +530,10 @@ export declare interface DropdownButtonConfig {
514
530
  color: StateStyles;
515
531
  /** 背景 */
516
532
  background: StateStyles;
533
+ /** 无边框背景 */
534
+ frameLessBackground: StateStyles;
535
+ /** 边框颜色 */
536
+ borderColor: StateStyles;
517
537
  /** 图标 */
518
538
  icon: {
519
539
  size: IconSize;
@@ -533,6 +553,8 @@ export declare interface DropdownButtonConfig {
533
553
  large: DropdownButtonSizeStyles;
534
554
  /** 中尺寸 */
535
555
  medium: DropdownButtonSizeStyles;
556
+ /** 小尺寸 */
557
+ small: DropdownButtonSizeStyles;
536
558
  };
537
559
  }
538
560
 
@@ -542,6 +564,7 @@ export declare interface DropdownButtonSizeStyles {
542
564
  fontSize: string;
543
565
  height: string;
544
566
  gap: string;
567
+ borderRadius: string;
545
568
  iconSize: IconSize;
546
569
  indicatorSize: IconSize;
547
570
  }
@@ -778,6 +801,10 @@ export declare interface EditorAttachmentOptions {
778
801
  * 附件选择器
779
802
  */
780
803
  picker?: EditorFilePicker;
804
+ /**
805
+ * 文件检查器
806
+ */
807
+ checker?: AbstractedEditorFileChecker;
781
808
  /**
782
809
  * 附件上传器
783
810
  */
@@ -1210,6 +1237,14 @@ export declare type EditorContextMenuOptions<TName extends string> = EditorMenuO
1210
1237
  */
1211
1238
  export declare type EditorCopyOptions = EditorLogicFeatureConfig;
1212
1239
 
1240
+ /**
1241
+ * 日期格式
1242
+ * - `YYYY/MM/DD` 年/月/日(简繁中文、韩语、日语默认)
1243
+ * - `MM/DD/YYYY` 月/日/年(英语默认)
1244
+ * - `DD/MM/YYYY` 日/月/年(其他语言默认)
1245
+ */
1246
+ export declare type EditorDateFormat = 'YYYY/MM/DD' | 'MM/DD/YYYY' | 'DD/MM/YYYY';
1247
+
1213
1248
  /**
1214
1249
  * 编辑器解密选项接口
1215
1250
  * 用于配置编辑器中需要解密的内容的相关选项
@@ -1387,11 +1422,31 @@ export declare interface EditorFilePicker {
1387
1422
  }
1388
1423
 
1389
1424
  export declare interface EditorFilePickerOpenOptions {
1425
+ /**
1426
+ * 文件类型限制
1427
+ */
1390
1428
  mimeTypes?: string[];
1429
+ /**
1430
+ * 最大文件尺寸限制
1431
+ */
1391
1432
  maxSize?: number;
1433
+ /**
1434
+ * 文件后缀限制
1435
+ */
1392
1436
  extensions?: string[];
1437
+ /**
1438
+ * 是否支持多选
1439
+ */
1393
1440
  multiple?: boolean;
1441
+ /**
1442
+ * 是否为选择文件夹
1443
+ */
1394
1444
  directory?: boolean;
1445
+ /**
1446
+ * 文件选择器接受的文件类型,如 'image/*' 表示接受所有图片文件
1447
+ * 如果指定了该配置,则不会再由extensions生成accept
1448
+ */
1449
+ accept?: string;
1395
1450
  }
1396
1451
 
1397
1452
  export declare interface EditorFollowMode {
@@ -1504,9 +1559,32 @@ export declare interface EditorFontsOptions {
1504
1559
  */
1505
1560
  list?: EditorFontsList;
1506
1561
  /**
1507
- * 是否只使用本地字体,如果为 true,则不会从服务器获取字体列表。
1562
+ * 字体列表中隐藏不可用的字体,包含外部传入的以及各套件内置的字体
1563
+ * 不可用的定义:非本地已安装且不支持下载
1564
+ */
1565
+ hideUnavailableFonts?: boolean;
1566
+ /**
1567
+ * 字体下载监听器注册函数,当字体状态发生变化时调用提供的回调函数。
1568
+ * 回调函数暂时没有参数,后续可以根据需要添加参数,例如提供变化的字体信息等。
1569
+ * @param listener
1570
+ * @returns
1571
+ */
1572
+ registerFontLoadListener?: (listener: (options: FontLoadListenerOptions) => void) => void;
1573
+ /**
1574
+ * 下载字体的函数,接受字体族名称和一个可选的配置对象作为参数。
1575
+ * 配置对象可以包含以下回调函数:
1576
+ * - onProgress: 在下载过程中调用,提供下载进度(0 到 1 之间的数字)。
1577
+ * - onComplete: 在下载完成时调用。
1578
+ * - onError: 在下载过程中发生错误时调用,提供错误对象。
1579
+ * @param fontFamily
1580
+ * @param option
1581
+ * @returns
1508
1582
  */
1509
- useLocalFontsOnly?: boolean;
1583
+ download?: (fontFamily: string, option?: {
1584
+ onProgress?: (progress: number) => void;
1585
+ onComplete?: () => void;
1586
+ onError?: (error: Error) => void;
1587
+ }) => void;
1510
1588
  }
1511
1589
 
1512
1590
  /**
@@ -1534,20 +1612,61 @@ export declare interface EditorHistory {
1534
1612
  hide: () => void;
1535
1613
  }
1536
1614
 
1537
- export declare type EditorHistoryOptions = EditorFeatureConfig;
1615
+ export declare interface EditorHistoryLimitations {
1616
+ /** 单个文件可还原的最近历史记录数量 */
1617
+ getHistoryLimitRevertNum?: () => number | undefined;
1618
+ /** 文件历史保留天数 */
1619
+ getHistoryLimitAllTime?: () => number | undefined;
1620
+ }
1621
+
1622
+ export declare type EditorHistoryOptions = EditorFeatureConfig & {
1623
+ limitations?: EditorHistoryLimitations;
1624
+ };
1538
1625
 
1539
1626
  /**
1540
1627
  * i18n 相关设置
1541
1628
  */
1542
1629
  export declare interface EditorI18nOptions {
1543
1630
  /**
1544
- * 语言,默认使用浏览器当前环境中的语言
1631
+ * 语言代码
1632
+ * 默认读取浏览器/设备语言并在支持的列表中匹配
1633
+ * 匹配规则:优先精确匹配,其次模糊匹配 language 部分,Fallback 为 en-US
1545
1634
  */
1546
- language?: string;
1635
+ language?: EditorLanguage;
1547
1636
  /**
1548
1637
  * 文本方向,默认根据语言自动适配
1549
1638
  */
1550
1639
  direction?: 'ltr' | 'rtl';
1640
+ /**
1641
+ * 时区设置(包含 ID、偏移量、标签)
1642
+ * 默认读取浏览器/设备时区,如无法匹配则根据语言推测
1643
+ * Fallback 为 { id: 'Europe/London', offset: 0, label: 'London' }
1644
+ */
1645
+ timezone?: EditorTimezoneInfo;
1646
+ /**
1647
+ * 日期格式
1648
+ * 默认根据语言自动匹配:
1649
+ * - 简繁中文、韩语、日语:YYYY/MM/DD
1650
+ * - 英语:MM/DD/YYYY
1651
+ * - 其他语言:DD/MM/YYYY
1652
+ * 用户手动设置后将保存并优先使用用户设置
1653
+ */
1654
+ dateFormat?: EditorDateFormat;
1655
+ /**
1656
+ * 时间格式
1657
+ * 默认使用 24 小时制
1658
+ * 注意:部分语言(如德语、法语、意大利语、俄语)不支持 12 小时制
1659
+ * 用户手动设置后将保存并优先使用用户设置
1660
+ */
1661
+ timeFormat?: EditorTimeFormat;
1662
+ /**
1663
+ * 周起始日
1664
+ * 默认根据语言自动匹配:
1665
+ * - 英语、阿拉伯语:星期日
1666
+ * - 其他语言:星期一
1667
+ * 用户手动设置后将保存并优先使用用户设置
1668
+ */
1669
+ weekStartDay?: EditorWeekStartDay;
1551
1670
  }
1552
1671
 
1553
1672
  export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'center' | 'east' | 'sw' | 'south' | 'se';
@@ -1592,6 +1711,27 @@ export declare interface EditorImportOptions {
1592
1711
  }>;
1593
1712
  }
1594
1713
 
1714
+ /**
1715
+ * 支持的语言代码
1716
+ * - `zh-CN` 简体中文
1717
+ * - `zh-TW` 繁体中文(含 zh-HK, zh-MO)
1718
+ * - `en-US` 英语
1719
+ * - `ja-JP` 日语
1720
+ * - `ko-KR` 韩语
1721
+ * - `es-ES` 西班牙语
1722
+ * - `pt-PT` 葡萄牙语
1723
+ * - `de-DE` 德语
1724
+ * - `fr-FR` 法语
1725
+ * - `it-IT` 意大利语
1726
+ * - `ru-RU` 俄语
1727
+ * - `id-ID` 印度尼西亚语
1728
+ * - `vi-VN` 越南语
1729
+ * - `th-TH` 泰语
1730
+ * - `ms-MY` 马来语
1731
+ * - `ar-SA` 阿拉伯语
1732
+ */
1733
+ 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';
1734
+
1595
1735
  /**
1596
1736
  * 链接配置,抽象打开链接等操作
1597
1737
  */
@@ -2141,7 +2281,11 @@ export declare interface EditorOptions {
2141
2281
  /**
2142
2282
  * 编辑器主题相关设置
2143
2283
  */
2144
- theme: EditorThemeOptions;
2284
+ theme?: EditorThemeOptions;
2285
+ /**
2286
+ * 编辑器拼写检查相关设置
2287
+ */
2288
+ spellCheck?: EditorSpellCheckOptions;
2145
2289
  }
2146
2290
 
2147
2291
  /**
@@ -2461,6 +2605,49 @@ export declare interface EditorSocket {
2461
2605
  connected: boolean;
2462
2606
  }
2463
2607
 
2608
+ export declare interface EditorSpellCheckDictionaryFileConfig {
2609
+ /** 词典文件的 aff 文件路径 */
2610
+ aff: string;
2611
+ /** 词典文件的 dic 文件路径 */
2612
+ dic: string;
2613
+ }
2614
+
2615
+ /**
2616
+ * 拼写检查相关配置
2617
+ */
2618
+ export declare interface EditorSpellCheckOptions extends EditorFeatureConfig {
2619
+ /**
2620
+ * 拼写检查功能配置
2621
+ */
2622
+ spellCheck?: {
2623
+ /**
2624
+ * 拼写检查功能是否被禁用
2625
+ */
2626
+ disabled?: boolean;
2627
+ /**
2628
+ * 拼写检查所需要的字典文件 CDN 域名
2629
+ */
2630
+ dictionaryCDNHost?: string;
2631
+ /**
2632
+ * 自定义拼写检查词典, 用于覆盖内置的默认词典
2633
+ */
2634
+ customDictionary?: Partial<Record<EditorLanguage, EditorSpellCheckDictionaryFileConfig>>;
2635
+ };
2636
+ /**
2637
+ * 语法检查功能配置
2638
+ */
2639
+ grammarCheck?: {
2640
+ /**
2641
+ * 语法检查功能是否被禁用
2642
+ */
2643
+ disabled?: boolean;
2644
+ /**
2645
+ * 拼写检查API的URL,必须使用绝对路径
2646
+ */
2647
+ url?: string;
2648
+ };
2649
+ }
2650
+
2464
2651
  /**
2465
2652
  * 编辑器在 `standard` 模式下的权限模式
2466
2653
  * - `editor` 编辑模式
@@ -2603,6 +2790,59 @@ export declare interface EditorThemeOptions<TExtensions = object> extends Common
2603
2790
  extensions?: TExtensions;
2604
2791
  }
2605
2792
 
2793
+ /**
2794
+ * 时间格式
2795
+ * - `24h` 24 小时制(默认)
2796
+ * - `12h` 12 小时制(部分语言不支持)
2797
+ */
2798
+ export declare type EditorTimeFormat = '24h' | '12h';
2799
+
2800
+ /**
2801
+ * 支持的时区 IANA ID
2802
+ *
2803
+ * 覆盖范围: UTC-12 到 UTC+12,共 34 个全球主要城市时区
2804
+ *
2805
+ * 注意事项:
2806
+ * - 所有时区 ID 均为 IANA 时区数据库标准标识符
2807
+ * - Etc/GMT+12 表示 UTC-12(Etc/GMT 时区符号与 UTC 相反)
2808
+ * - 不包括已弃用或非标准时区标识符
2809
+ *
2810
+ * @see https://www.iana.org/time-zones
2811
+ */
2812
+ 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';
2813
+
2814
+ /**
2815
+ * 时区信息
2816
+ */
2817
+ export declare interface EditorTimezoneInfo {
2818
+ /**
2819
+ * IANA 时区 ID
2820
+ *
2821
+ * 标准的 IANA 时区数据库标识符
2822
+ *
2823
+ * @example 'Asia/Shanghai', 'America/New_York', 'Europe/London'
2824
+ */
2825
+ id: EditorTimezoneId;
2826
+ /**
2827
+ * UTC 偏移量(小时,标准时间)
2828
+ *
2829
+ * - 正数:东半球,如 `8` 表示 UTC+8(北京)
2830
+ * - 负数:西半球,如 `-5` 表示 UTC-5(纽约标准时间)
2831
+ * - 零:格林威治标准时间
2832
+ *
2833
+ * 注意:此值为标准时间,不包含夏令时调整
2834
+ */
2835
+ offset: number;
2836
+ /**
2837
+ * 时区标签(英文)
2838
+ *
2839
+ * 用于 UI 显示的城市或地区名称
2840
+ *
2841
+ * @example 'Shanghai', 'New York', 'London'
2842
+ */
2843
+ label: string;
2844
+ }
2845
+
2606
2846
  /**
2607
2847
  * 工具栏功能按钮配置(包括内置按钮和自定义按钮)
2608
2848
  */
@@ -2666,6 +2906,16 @@ export declare interface EditorToolbarOptions<TName extends string> {
2666
2906
  * 如果不配置则按照套件的默认方式挂载。
2667
2907
  */
2668
2908
  container?: HTMLElement;
2909
+ /**
2910
+ * 工具栏样式
2911
+ * 各套件可自行扩展,目前支持背景色配置
2912
+ */
2913
+ style?: {
2914
+ /**
2915
+ * 背景色
2916
+ */
2917
+ backgroundColor?: string;
2918
+ };
2669
2919
  }
2670
2920
 
2671
2921
  /**
@@ -2879,9 +3129,11 @@ export declare interface EditorUserOptions {
2879
3129
  export declare interface EditorVersion {
2880
3130
  /**
2881
3131
  * 保存版本
2882
- * @param name 版本名称
3132
+ * @param options 版本名称
2883
3133
  */
2884
- createRevision: (name?: string) => void;
3134
+ createRevision: (options?: string | {
3135
+ name: string;
3136
+ }) => void;
2885
3137
  /**
2886
3138
  * 显示版本(侧边栏或其他形式)
2887
3139
  * 区别于历史侧边栏,在应用表格里表现为打开历史侧边栏切换到版本 tab
@@ -2894,7 +3146,14 @@ export declare interface EditorVersion {
2894
3146
  hide?: () => void;
2895
3147
  }
2896
3148
 
2897
- export declare type EditorVersionOptions = EditorFeatureConfig;
3149
+ export declare interface EditorVersionLimitations {
3150
+ /** 单个文件可保存/还原的版本(快照)数量 */
3151
+ getHistoryLimitVersionNum?: () => number | undefined;
3152
+ }
3153
+
3154
+ export declare type EditorVersionOptions = EditorFeatureConfig & {
3155
+ limitations?: EditorVersionLimitations;
3156
+ };
2898
3157
 
2899
3158
  /**
2900
3159
  * 编辑器外部水印信息
@@ -2924,6 +3183,13 @@ export declare type EditorWatermarkResource = {
2924
3183
  url: string;
2925
3184
  };
2926
3185
 
3186
+ /**
3187
+ * 周起始日
3188
+ * - `sunday` 星期日(英语、阿拉伯语默认)
3189
+ * - `monday` 星期一(其他语言默认)
3190
+ */
3191
+ export declare type EditorWeekStartDay = 'sunday' | 'monday';
3192
+
2927
3193
  export declare interface FileLinkParams {
2928
3194
  /**
2929
3195
  * 文件guid
@@ -2995,6 +3261,35 @@ export declare interface FontFamilyConfig {
2995
3261
  base: string;
2996
3262
  }
2997
3263
 
3264
+ /**
3265
+ * 字体下载事件类型
3266
+ */
3267
+ export declare enum FontLoadEventType {
3268
+ DownloadStart = "downloadStart",
3269
+ DownloadProgress = "downloadProgress",
3270
+ DownloadComplete = "downloadComplete",
3271
+ DownloadError = "downloadError"
3272
+ }
3273
+
3274
+ /**
3275
+ * 字体下载事件监听器参数,根据事件类型提供不同的属性
3276
+ */
3277
+ export declare type FontLoadListenerOptions = {
3278
+ type: FontLoadEventType.DownloadStart;
3279
+ id: string;
3280
+ } | {
3281
+ type: FontLoadEventType.DownloadComplete;
3282
+ id: string;
3283
+ } | {
3284
+ type: FontLoadEventType.DownloadProgress;
3285
+ id: string;
3286
+ progress: number;
3287
+ } | {
3288
+ type: FontLoadEventType.DownloadError;
3289
+ id: string;
3290
+ error: Error;
3291
+ };
3292
+
2998
3293
  /** 字号配置 */
2999
3294
  export declare interface FontSizeConfig {
3000
3295
  /** 超小字号 */
@@ -3129,6 +3424,16 @@ export declare interface HTTPProxy {
3129
3424
  * @returns
3130
3425
  */
3131
3426
  create: (id: string) => Promise<HTTPProxy>;
3427
+ /**
3428
+ * 凭证更新器,用于套件内部主动发起更新凭证操作
3429
+ * 例如:页面可见性发生变化时,在pull请求发起之前
3430
+ */
3431
+ credentials?: {
3432
+ /**
3433
+ * 更新凭证
3434
+ */
3435
+ update: () => Promise<void>;
3436
+ };
3132
3437
  }
3133
3438
 
3134
3439
  /**
@@ -3328,6 +3633,8 @@ export declare interface InputStateColorStyles {
3328
3633
  textColorNormal: string;
3329
3634
  /** 禁用文字颜色 */
3330
3635
  textColorDisabled: string;
3636
+ /** 只读文字颜色 */
3637
+ textColorReadOnly: string;
3331
3638
  }
3332
3639
 
3333
3640
  /** Input 状态样式配置 */
@@ -3414,8 +3721,15 @@ export declare interface MentionInfo {
3414
3721
  export declare interface MenuConfig {
3415
3722
  /** 菜单项配置 */
3416
3723
  menuItem: MenuItemConfig;
3724
+ /** 子菜单 */
3725
+ subMenu: {
3726
+ /** 子菜单弹出位置偏移 */
3727
+ popupOffset: number[];
3728
+ };
3417
3729
  /** 边框 */
3418
3730
  border: BorderConfig;
3731
+ /** 阴影 */
3732
+ boxShadow: Pick<StateStyles, 'normal' | 'hover'>;
3419
3733
  /** 分割线 */
3420
3734
  divider: {
3421
3735
  background: string;
@@ -3439,6 +3753,8 @@ export declare interface MenuItemConfig {
3439
3753
  active: string;
3440
3754
  disabled: string;
3441
3755
  };
3756
+ /** 边框 */
3757
+ border: BorderConfig;
3442
3758
  /** 布局 */
3443
3759
  layout: {
3444
3760
  /** 内边距 */
@@ -3470,6 +3786,8 @@ export declare interface MenuItemConfig {
3470
3786
  };
3471
3787
  /** 尺寸 */
3472
3788
  size: {
3789
+ /** 小尺寸 */
3790
+ small: MenuItemSizeStyles;
3473
3791
  /** 中尺寸 */
3474
3792
  medium: MenuItemSizeStyles;
3475
3793
  /** 大尺寸 */
@@ -3742,6 +4060,7 @@ export declare interface SliderSizeStyles {
3742
4060
  thumbSize: string;
3743
4061
  /** 滑块偏移(距离边缘的间距) */
3744
4062
  thumbOffset: string;
4063
+ borderWidth: string;
3745
4064
  }
3746
4065
 
3747
4066
  /** Slider 滑块(圆点)样式 */
@@ -3756,6 +4075,8 @@ export declare interface SliderTrackStyles {
3756
4075
  backgroundDisabled: string;
3757
4076
  /** 已填充部分背景 */
3758
4077
  filledBackground: string;
4078
+ /** 已填充部分禁用状态背景 */
4079
+ filledBackgroundDisabled: string;
3759
4080
  /** 高度 */
3760
4081
  height: string;
3761
4082
  /** 宽度 */
@@ -3909,7 +4230,18 @@ export declare interface SyncStatusDelegation {
3909
4230
  /** Tab 完整配置 */
3910
4231
  export declare interface TabConfig {
3911
4232
  /** 线性标签页(仅下边框) */
3912
- line: TabVariantStyles;
4233
+ line: {
4234
+ backgroundColor: string;
4235
+ item: TabStateStyles & {
4236
+ /** 选中底部线条宽度/高度 */
4237
+ bottomActiveWidth: string;
4238
+ /** 选中底部线条圆角 */
4239
+ bottomActiveBorderRadius: string;
4240
+ /** 选中底部线条背景颜色 */
4241
+ bottomActiveBackgroundColor: string;
4242
+ };
4243
+ layout: TabLayoutStyles;
4244
+ };
3913
4245
  /** 面性标签页(带所有边框) */
3914
4246
  card: TabVariantStyles;
3915
4247
  /** 大尺寸配置 */
@@ -3933,8 +4265,10 @@ export declare interface TabStateStyles extends BackgroundStateStyles, BorderSta
3933
4265
  export declare interface TabVariantStyles {
3934
4266
  /** Tab 项状态样式 */
3935
4267
  item: TabStateStyles;
3936
- /** 布局样式 */
4268
+ /** 布局 */
3937
4269
  layout: TabLayoutStyles;
4270
+ /** tab条背景颜色 */
4271
+ backgroundColor: string;
3938
4272
  }
3939
4273
 
3940
4274
  /** Text Button 变体配置(在基础变体上扩展带背景色的引导样式) */
@@ -4015,6 +4349,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
4015
4349
  error: ToastVariantStyles;
4016
4350
  /** 警告提示样式 */
4017
4351
  warn: ToastVariantStyles;
4352
+ /** 严重警告样式 */
4353
+ critical: ToastVariantStyles;
4354
+ /** 加载提示样式 */
4355
+ loading: ToastVariantStyles;
4018
4356
  /** 偏移量 */
4019
4357
  offset: {
4020
4358
  /** 垂直偏移量 */
@@ -4022,6 +4360,10 @@ export declare interface ToastConfig extends ToastBaseStyles {
4022
4360
  /** 水平偏移量 */
4023
4361
  horizontal: string;
4024
4362
  };
4363
+ /** 关闭按钮 */
4364
+ closeButton: {
4365
+ icon: Pick<IconConfig, 'url'>;
4366
+ };
4025
4367
  }
4026
4368
 
4027
4369
  /**
@@ -4093,6 +4435,11 @@ export declare interface ToastVariantStyles {
4093
4435
  borderColor: string;
4094
4436
  /** 图标配置 */
4095
4437
  icon: IconConfig;
4438
+ /** 消息 */
4439
+ message: {
4440
+ /** 颜色 */
4441
+ color: string;
4442
+ };
4096
4443
  }
4097
4444
 
4098
4445
  /** ToolbarButton 背景状态样式 */
@@ -4138,6 +4485,8 @@ export declare interface ToolbarButtonLayout {
4138
4485
  padding: string;
4139
4486
  /** 整体高度 */
4140
4487
  height: string;
4488
+ /** 整体圆角 */
4489
+ borderRadius: string;
4141
4490
  /** 内容布局 */
4142
4491
  content: {
4143
4492
  padding: string;
@@ -4232,6 +4581,8 @@ export declare interface TooltipStyleConfig {
4232
4581
  lineHeight: string;
4233
4582
  /** 字重 */
4234
4583
  fontWeight: number;
4584
+ /** 最大宽度 */
4585
+ maxWidth?: string;
4235
4586
  }
4236
4587
 
4237
4588
  /** Tooltip White 风格配置 */