@univerjs/ui 0.1.0-alpha.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 (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/lib/cjs/index.js +4671 -0
  4. package/lib/cjs/locale/en-US.js +46 -0
  5. package/lib/cjs/locale/zh-CN.js +35 -0
  6. package/lib/esm/index.js +4507 -0
  7. package/lib/esm/locale/en-US.js +25 -0
  8. package/lib/esm/locale/zh-CN.js +14 -0
  9. package/lib/index.css +474 -0
  10. package/lib/types/BaseComponent.d.ts +8 -0
  11. package/lib/types/BaseComponent.d.ts.map +1 -0
  12. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +4 -0
  13. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts.map +1 -0
  14. package/lib/types/common/component-manager.d.ts +14 -0
  15. package/lib/types/common/component-manager.d.ts.map +1 -0
  16. package/lib/types/common/index.d.ts +3 -0
  17. package/lib/types/common/index.d.ts.map +1 -0
  18. package/lib/types/common/lifecycle.d.ts +4 -0
  19. package/lib/types/common/lifecycle.d.ts.map +1 -0
  20. package/lib/types/common/z-index-manager.d.ts +8 -0
  21. package/lib/types/common/z-index-manager.d.ts.map +1 -0
  22. package/lib/types/components/custom-label/CustomLabel.d.ts +14 -0
  23. package/lib/types/components/custom-label/CustomLabel.d.ts.map +1 -0
  24. package/lib/types/components/custom-label/index.d.ts +2 -0
  25. package/lib/types/components/custom-label/index.d.ts.map +1 -0
  26. package/lib/types/components/hooks/observable.d.ts +4 -0
  27. package/lib/types/components/hooks/observable.d.ts.map +1 -0
  28. package/lib/types/components/index.d.ts +3 -0
  29. package/lib/types/components/index.d.ts.map +1 -0
  30. package/lib/types/components/menu/Menu.d.ts +11 -0
  31. package/lib/types/components/menu/Menu.d.ts.map +1 -0
  32. package/lib/types/components/menu/index.d.ts +2 -0
  33. package/lib/types/components/menu/index.d.ts.map +1 -0
  34. package/lib/types/components/notification/Notification.d.ts +41 -0
  35. package/lib/types/components/notification/Notification.d.ts.map +1 -0
  36. package/lib/types/controllers/error/error.controller.d.ts +8 -0
  37. package/lib/types/controllers/error/error.controller.d.ts.map +1 -0
  38. package/lib/types/controllers/menus/menus.d.ts +5 -0
  39. package/lib/types/controllers/menus/menus.d.ts.map +1 -0
  40. package/lib/types/controllers/shared-shortcut.controller.d.ts +25 -0
  41. package/lib/types/controllers/shared-shortcut.controller.d.ts.map +1 -0
  42. package/lib/types/controllers/shortcut-display/menu.d.ts +3 -0
  43. package/lib/types/controllers/shortcut-display/menu.d.ts.map +1 -0
  44. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +10 -0
  45. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts.map +1 -0
  46. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +55 -0
  47. package/lib/types/controllers/ui/ui-desktop.controller.d.ts.map +1 -0
  48. package/lib/types/controllers/ui/ui.controller.d.ts +14 -0
  49. package/lib/types/controllers/ui/ui.controller.d.ts.map +1 -0
  50. package/lib/types/index.d.ts +30 -0
  51. package/lib/types/index.d.ts.map +1 -0
  52. package/lib/types/locale/en-US.d.ts +23 -0
  53. package/lib/types/locale/en-US.d.ts.map +1 -0
  54. package/lib/types/locale/index.d.ts +3 -0
  55. package/lib/types/locale/index.d.ts.map +1 -0
  56. package/lib/types/locale/zh-CN.d.ts +12 -0
  57. package/lib/types/locale/zh-CN.d.ts.map +1 -0
  58. package/lib/types/services/before-close/before-close.service.d.ts +21 -0
  59. package/lib/types/services/before-close/before-close.service.d.ts.map +1 -0
  60. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +36 -0
  61. package/lib/types/services/clipboard/clipboard-interface.service.d.ts.map +1 -0
  62. package/lib/types/services/clipboard/clipboard.command.d.ts +5 -0
  63. package/lib/types/services/clipboard/clipboard.command.d.ts.map +1 -0
  64. package/lib/types/services/confirm/confirm.service.d.ts +10 -0
  65. package/lib/types/services/confirm/confirm.service.d.ts.map +1 -0
  66. package/lib/types/services/confirm/desktop-confirm.service.d.ts +12 -0
  67. package/lib/types/services/confirm/desktop-confirm.service.d.ts.map +1 -0
  68. package/lib/types/services/contextmenu/contextmenu.service.d.ts +18 -0
  69. package/lib/types/services/contextmenu/contextmenu.service.d.ts.map +1 -0
  70. package/lib/types/services/dialog/desktop-dialog.service.d.ts +12 -0
  71. package/lib/types/services/dialog/desktop-dialog.service.d.ts.map +1 -0
  72. package/lib/types/services/dialog/dialog.service.d.ts +10 -0
  73. package/lib/types/services/dialog/dialog.service.d.ts.map +1 -0
  74. package/lib/types/services/focus/focus.service.d.ts +22 -0
  75. package/lib/types/services/focus/focus.service.d.ts.map +1 -0
  76. package/lib/types/services/local-storage/local-storage.service.d.ts +11 -0
  77. package/lib/types/services/local-storage/local-storage.service.d.ts.map +1 -0
  78. package/lib/types/services/menu/menu.d.ts +103 -0
  79. package/lib/types/services/menu/menu.d.ts.map +1 -0
  80. package/lib/types/services/menu/menu.service.d.ts +28 -0
  81. package/lib/types/services/menu/menu.service.d.ts.map +1 -0
  82. package/lib/types/services/message/desktop-message.service.d.ts +11 -0
  83. package/lib/types/services/message/desktop-message.service.d.ts.map +1 -0
  84. package/lib/types/services/message/message.service.d.ts +8 -0
  85. package/lib/types/services/message/message.service.d.ts.map +1 -0
  86. package/lib/types/services/notification/desktop-notification.service.d.ts +7 -0
  87. package/lib/types/services/notification/desktop-notification.service.d.ts.map +1 -0
  88. package/lib/types/services/notification/notification.service.d.ts +7 -0
  89. package/lib/types/services/notification/notification.service.d.ts.map +1 -0
  90. package/lib/types/services/platform/platform.service.d.ts +15 -0
  91. package/lib/types/services/platform/platform.service.d.ts.map +1 -0
  92. package/lib/types/services/shortcut/keycode.d.ts +79 -0
  93. package/lib/types/services/shortcut/keycode.d.ts.map +1 -0
  94. package/lib/types/services/shortcut/shortcut-experience.service.d.ts +31 -0
  95. package/lib/types/services/shortcut/shortcut-experience.service.d.ts.map +1 -0
  96. package/lib/types/services/shortcut/shortcut-panel.service.d.ts +10 -0
  97. package/lib/types/services/shortcut/shortcut-panel.service.d.ts.map +1 -0
  98. package/lib/types/services/shortcut/shortcut.service.d.ts +55 -0
  99. package/lib/types/services/shortcut/shortcut.service.d.ts.map +1 -0
  100. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +12 -0
  101. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts.map +1 -0
  102. package/lib/types/services/sidebar/sidebar.service.d.ts +10 -0
  103. package/lib/types/services/sidebar/sidebar.service.d.ts.map +1 -0
  104. package/lib/types/ui-plugin.d.ts +20 -0
  105. package/lib/types/ui-plugin.d.ts.map +1 -0
  106. package/lib/types/utils/cell.d.ts +34 -0
  107. package/lib/types/utils/cell.d.ts.map +1 -0
  108. package/lib/types/utils/index.d.ts +3 -0
  109. package/lib/types/utils/index.d.ts.map +1 -0
  110. package/lib/types/utils/util.d.ts +2 -0
  111. package/lib/types/utils/util.d.ts.map +1 -0
  112. package/lib/types/views/App.d.ts +13 -0
  113. package/lib/types/views/App.d.ts.map +1 -0
  114. package/lib/types/views/components/ComponentContainer.d.ts +6 -0
  115. package/lib/types/views/components/ComponentContainer.d.ts.map +1 -0
  116. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +3 -0
  117. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts.map +1 -0
  118. package/lib/types/views/components/confirm-part/interface.d.ts +8 -0
  119. package/lib/types/views/components/confirm-part/interface.d.ts.map +1 -0
  120. package/lib/types/views/components/context-menu/ContextMenu.d.ts +5 -0
  121. package/lib/types/views/components/context-menu/ContextMenu.d.ts.map +1 -0
  122. package/lib/types/views/components/dialog-part/DialogPart.d.ts +3 -0
  123. package/lib/types/views/components/dialog-part/DialogPart.d.ts.map +1 -0
  124. package/lib/types/views/components/dialog-part/interface.d.ts +10 -0
  125. package/lib/types/views/components/dialog-part/interface.d.ts.map +1 -0
  126. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +28 -0
  127. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts.map +1 -0
  128. package/lib/types/views/components/doc-bars/MenuBar.d.ts +7 -0
  129. package/lib/types/views/components/doc-bars/MenuBar.d.ts.map +1 -0
  130. package/lib/types/views/components/doc-bars/Toolbar.d.ts +3 -0
  131. package/lib/types/views/components/doc-bars/Toolbar.d.ts.map +1 -0
  132. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +4 -0
  133. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts.map +1 -0
  134. package/lib/types/views/components/doc-bars/hooks/menu.d.ts +10 -0
  135. package/lib/types/views/components/doc-bars/hooks/menu.d.ts.map +1 -0
  136. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +6 -0
  137. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts.map +1 -0
  138. package/lib/types/views/components/sidebar/Sidebar.d.ts +3 -0
  139. package/lib/types/views/components/sidebar/Sidebar.d.ts.map +1 -0
  140. package/lib/types/views/components/sidebar/interface.d.ts +11 -0
  141. package/lib/types/views/components/sidebar/interface.d.ts.map +1 -0
  142. package/lib/types/views/parts.d.ts +3 -0
  143. package/lib/types/views/parts.d.ts.map +1 -0
  144. package/package.json +77 -0
@@ -0,0 +1,41 @@
1
+ import type { Placement } from 'rc-notification/es/interface';
2
+ import React from 'react';
3
+ import { Subject } from 'rxjs';
4
+ export type NotificationType = 'success' | 'info' | 'warning' | 'error';
5
+ export interface INotificationMethodOptions {
6
+ /**
7
+ * Component type, optional success, warning, error
8
+ */
9
+ type: NotificationType;
10
+ /**
11
+ * The title text of the notification
12
+ */
13
+ title: string;
14
+ /**
15
+ * The content text of the notification
16
+ */
17
+ content: string;
18
+ /**
19
+ * Popup position
20
+ */
21
+ placement?: Placement;
22
+ /**
23
+ * Automatic close time
24
+ */
25
+ duration?: number;
26
+ /**
27
+ * Whether to support closing
28
+ */
29
+ closable?: boolean;
30
+ /**
31
+ * The number of lines of content text. Ellipses will be displayed beyond the line number.
32
+ */
33
+ lines?: number;
34
+ }
35
+ export declare const notificationObserver: Subject<INotificationMethodOptions>;
36
+ export declare const PureContent: (props: INotificationMethodOptions) => React.JSX.Element;
37
+ export declare function Notification(): React.JSX.Element;
38
+ export declare const notification: {
39
+ show: (options: INotificationMethodOptions) => void;
40
+ };
41
+ //# sourceMappingURL=Notification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/components/notification/Notification.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAwC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAI/B,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AASxE,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,oBAAoB,qCAA4C,CAAC;AAE9E,eAAO,MAAM,WAAW,UAAW,0BAA0B,sBAkB5D,CAAC;AAEF,wBAAgB,YAAY,sBAyC3B;AAED,eAAO,MAAM,YAAY;oBACL,0BAA0B;CAG7C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Disposable, ErrorService } from '@univerjs/core';
2
+ import { IMessageService } from '../../services/message/message.service';
3
+ export declare class ErrorController extends Disposable {
4
+ private readonly _errorService;
5
+ private readonly _messageService;
6
+ constructor(_errorService: ErrorService, _messageService: IMessageService);
7
+ }
8
+ //# sourceMappingURL=error.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.controller.d.ts","sourceRoot":"","sources":["../../../../src/controllers/error/error.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAA8C,MAAM,gBAAgB,CAAC;AAItG,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,qBACa,eAAgB,SAAQ,UAAU;IAEjB,OAAO,CAAC,QAAQ,CAAC,aAAa;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADV,aAAa,EAAE,YAAY,EAChC,eAAe,EAAE,eAAe;CAezE"}
@@ -0,0 +1,5 @@
1
+ import type { IAccessor } from '@wendellhu/redi';
2
+ import type { IMenuButtonItem } from '../../services/menu/menu';
3
+ export declare function UndoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
4
+ export declare function RedoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
5
+ //# sourceMappingURL=menus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menus.d.ts","sourceRoot":"","sources":["../../../../src/controllers/menus/menus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,eAAe,CAaxE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,eAAe,CAaxE"}
@@ -0,0 +1,25 @@
1
+ import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { IMenuService } from '../services/menu/menu.service';
4
+ import type { IShortcutItem } from '../services/shortcut/shortcut.service';
5
+ import { IShortcutService } from '../services/shortcut/shortcut.service';
6
+ export declare const CopyShortcutItem: IShortcutItem;
7
+ export declare const CutShortcutItem: IShortcutItem;
8
+ export declare const PasteShortcutItem: IShortcutItem;
9
+ export declare const UndoShortcutItem: IShortcutItem;
10
+ export declare const RedoShortcutItem: IShortcutItem;
11
+ /**
12
+ * Define shared UI behavior across Univer business.
13
+ */
14
+ export declare class SharedController extends Disposable {
15
+ private readonly _injector;
16
+ private readonly _menuService;
17
+ private readonly _shortcutService;
18
+ private readonly _commandService;
19
+ constructor(_injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService);
20
+ initialize(): void;
21
+ private _registerMenus;
22
+ private _registerCommands;
23
+ private _registerShortcuts;
24
+ }
25
+ //# sourceMappingURL=shared-shortcut.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-shortcut.controller.d.ts","sourceRoot":"","sources":["../../../src/controllers/shared-shortcut.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAA0D,MAAM,gBAAgB,CAAC;AACrH,OAAO,EAAU,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAGzE,eAAO,MAAM,gBAAgB,EAAE,aAK9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,aAK7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,aAK/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,aAK9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,aAK9B,CAAC;AAEF;;GAEG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAEtB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAHd,SAAS,EAAE,QAAQ,EACvB,YAAY,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,EACnC,eAAe,EAAE,eAAe;IAOtE,UAAU,IAAI,IAAI;IAMlB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,kBAAkB;CAK7B"}
@@ -0,0 +1,3 @@
1
+ import type { IMenuButtonItem } from '../../services/menu/menu';
2
+ export declare function ShortcutPanelMenuItemFactory(): IMenuButtonItem;
3
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/controllers/shortcut-display/menu.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,wBAAgB,4BAA4B,IAAI,eAAe,CAS9D"}
@@ -0,0 +1,10 @@
1
+ import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { ComponentManager } from '../../common/component-manager';
3
+ import { IMenuService } from '../../services/menu/menu.service';
4
+ /**
5
+ * This controller add a side panel to the application to display the shortcuts.
6
+ */
7
+ export declare class ShortcutPanelController extends Disposable {
8
+ constructor(menuService: IMenuService, commandService: ICommandService, componentManager: ComponentManager);
9
+ }
10
+ //# sourceMappingURL=shortcut-panel.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcut-panel.controller.d.ts","sourceRoot":"","sources":["../../../../src/controllers/shortcut-display/shortcut-panel.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAgC,MAAM,gBAAgB,CAAC;AAO3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAIhE;;GAEG;AACH,qBACa,uBAAwB,SAAQ,UAAU;gBAEjC,WAAW,EAAE,YAAY,EACtB,cAAc,EAAE,eAAe,EACtB,gBAAgB,EAAE,gBAAgB;CAUnE"}
@@ -0,0 +1,55 @@
1
+ import { Disposable, LifecycleService } from '@univerjs/core';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ import type { IDisposable } from '@wendellhu/redi';
4
+ import { Injector } from '@wendellhu/redi';
5
+ import type { ComponentType } from 'react';
6
+ import React from 'react';
7
+ import type { Observable } from 'rxjs';
8
+ import { IFocusService } from '../../services/focus/focus.service';
9
+ import type { IWorkbenchOptions } from './ui.controller';
10
+ import { IUIController } from './ui.controller';
11
+ export declare enum DesktopUIPart {
12
+ HEADER = "header",
13
+ HEADER_MENU = "header-menu",
14
+ CONTENT = "content",
15
+ FOOTER = "footer"
16
+ }
17
+ /**
18
+ * IDesktopUIController
19
+ */
20
+ export interface IDesktopUIController extends IUIController {
21
+ componentRegistered$: Observable<void>;
22
+ registerComponent(part: DesktopUIPart, component: () => ComponentType): IDisposable;
23
+ getHeaderMenuComponents(): Set<() => ComponentType>;
24
+ registerHeaderComponent(component: () => ComponentType): IDisposable;
25
+ getHeaderComponents(): Set<() => ComponentType>;
26
+ registerContentComponent(component: () => ComponentType): IDisposable;
27
+ getContentComponents(): Set<() => ComponentType>;
28
+ registerFooterComponent(component: () => ComponentType): IDisposable;
29
+ getFooterComponents(): Set<() => ComponentType>;
30
+ }
31
+ export declare class DesktopUIController extends Disposable implements IDesktopUIController {
32
+ private readonly _injector;
33
+ private readonly _lifecycleService;
34
+ private readonly _renderManagerService;
35
+ private readonly _focusService;
36
+ private _headerComponents;
37
+ private _headerMenuComponents;
38
+ private _contentComponents;
39
+ private _footerComponents;
40
+ private _componentRegistered$;
41
+ componentRegistered$: Observable<void>;
42
+ constructor(_injector: Injector, _lifecycleService: LifecycleService, _renderManagerService: IRenderManagerService, _focusService: IFocusService);
43
+ bootstrapWorkbench(options: IWorkbenchOptions): void;
44
+ private _initializeEngine;
45
+ registerComponent(part: DesktopUIPart, component: () => React.ComponentType): IDisposable;
46
+ registerHeaderMenuComponent(component: () => ComponentType): IDisposable;
47
+ getHeaderMenuComponents(): Set<() => ComponentType>;
48
+ registerHeaderComponent(component: () => ComponentType): IDisposable;
49
+ getHeaderComponents(): Set<() => ComponentType>;
50
+ registerContentComponent(component: () => ComponentType): IDisposable;
51
+ getContentComponents(): Set<() => ComponentType>;
52
+ registerFooterComponent(component: () => ComponentType): IDisposable;
53
+ getFooterComponents(): Set<() => ComponentType>;
54
+ }
55
+ //# sourceMappingURL=ui-desktop.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-desktop.controller.d.ts","sourceRoot":"","sources":["../../../../src/controllers/ui/ui-desktop.controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAiC,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAU,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,MAAM,WAAW;CAEpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACvD,oBAAoB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAIvC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW,CAAC;IAEpF,uBAAuB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC,CAAC;IAGpD,uBAAuB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW,CAAC;IACrE,mBAAmB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC,CAAC;IAGhD,wBAAwB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW,CAAC;IACtE,oBAAoB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC,CAAC;IAGjD,uBAAuB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW,CAAC;IACrE,mBAAmB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC,CAAC;CAInD;AAID,qBAAa,mBAAoB,SAAQ,UAAW,YAAW,oBAAoB;IAWzD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAClB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IACrC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa;IAbjD,OAAO,CAAC,iBAAiB,CAAuC;IAChE,OAAO,CAAC,qBAAqB,CAAuC;IACpE,OAAO,CAAC,kBAAkB,CAAuC;IACjE,OAAO,CAAC,iBAAiB,CAAuC;IAGhE,OAAO,CAAC,qBAAqB,CAAuB;IACpD,oBAAoB,mBAA6C;gBAG1B,SAAS,EAAE,QAAQ,EACX,iBAAiB,EAAE,gBAAgB,EACtC,qBAAqB,EAAE,qBAAqB,EACpD,aAAa,EAAE,aAAa;IAKhE,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAYpD,OAAO,CAAC,iBAAiB;IAKzB,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC,aAAa,GAAG,WAAW;IAiBzF,2BAA2B,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW;IAMxE,uBAAuB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC;IAInD,uBAAuB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW;IAMpE,mBAAmB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC;IAI/C,wBAAwB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW;IAMrE,oBAAoB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC;IAIhD,uBAAuB,CAAC,SAAS,EAAE,MAAM,aAAa,GAAG,WAAW;IAMpE,mBAAmB,IAAI,GAAG,CAAC,MAAM,aAAa,CAAC;CAalD"}
@@ -0,0 +1,14 @@
1
+ export interface IWorkbenchOptions {
2
+ container?: string | HTMLElement;
3
+ outerLeft?: boolean;
4
+ innerLeft?: boolean;
5
+ header?: boolean;
6
+ infoBar?: boolean;
7
+ toolbar?: boolean;
8
+ footer?: boolean;
9
+ }
10
+ export interface IUIController {
11
+ bootstrapWorkbench(options: IWorkbenchOptions): void;
12
+ }
13
+ export declare const IUIController: import("@wendellhu/redi").IdentifierDecorator<IUIController>;
14
+ //# sourceMappingURL=ui.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.controller.d.ts","sourceRoot":"","sources":["../../../../src/controllers/ui/ui.controller.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAEjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,aAAa,8DAA0D,CAAC"}
@@ -0,0 +1,30 @@
1
+ export * from './BaseComponent';
2
+ export * from './common';
3
+ export * from './components';
4
+ export { useObservable } from './components/hooks/observable';
5
+ export { CopyShortcutItem, CutShortcutItem, PasteShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
6
+ export { IUIController } from './controllers/ui/ui.controller';
7
+ export { DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
8
+ export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
9
+ export { CopyCommand, CutCommand, PasteCommand } from './services/clipboard/clipboard.command';
10
+ export { BrowserClipboardService, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
11
+ export { IConfirmService } from './services/confirm/confirm.service';
12
+ export { DesktopConfirmService } from './services/confirm/desktop-confirm.service';
13
+ export { DesktopContextMenuService, type IContextMenuHandler, IContextMenuService, } from './services/contextmenu/contextmenu.service';
14
+ export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
15
+ export { IDialogService } from './services/dialog/dialog.service';
16
+ export { type ICustomComponentProps, type IDisplayMenuItem, type IMenuButtonItem, type IMenuItem, type IMenuItemFactory, type IMenuSelectorItem, type IValueOption, MenuGroup, MenuItemType, MenuPosition, } from './services/menu/menu';
17
+ export { DesktopMenuService, IMenuService } from './services/menu/menu.service';
18
+ export { DesktopMessageService } from './services/message/desktop-message.service';
19
+ export { IMessageService } from './services/message/message.service';
20
+ export { DesktopNotificationService } from './services/notification/desktop-notification.service';
21
+ export { INotificationService } from './services/notification/notification.service';
22
+ export { DesktopPlatformService, IPlatformService } from './services/platform/platform.service';
23
+ export { KeyCode, MetaKeys } from './services/shortcut/keycode';
24
+ export { DesktopShortcutService, type IShortcutItem, IShortcutService } from './services/shortcut/shortcut.service';
25
+ export { ShortcutExperienceService } from './services/shortcut/shortcut-experience.service';
26
+ export { DesktopSidebarService } from './services/sidebar/desktop-sidebar.service';
27
+ export { ISidebarService } from './services/sidebar/sidebar.service';
28
+ export { UIPlugin } from './ui-plugin';
29
+ export * from './utils';
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAC9G,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EACH,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,GACjC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACH,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,mBAAmB,GACtB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,SAAS,EACT,YAAY,EACZ,YAAY,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACpH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ uiToolbar: {
3
+ start: string;
4
+ insert: string;
5
+ formulas: string;
6
+ data: string;
7
+ view: string;
8
+ others: string;
9
+ };
10
+ 'shortcut-panel': {
11
+ title: string;
12
+ };
13
+ shortcut: {
14
+ undo: string;
15
+ redo: string;
16
+ cut: string;
17
+ copy: string;
18
+ paste: string;
19
+ };
20
+ 'common-edit': string;
21
+ };
22
+ export default _default;
23
+ //# sourceMappingURL=en-US.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../src/locale/en-US.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wBAoBE"}
@@ -0,0 +1,3 @@
1
+ export { default as enUS } from './en-US';
2
+ export { default as zhCN } from './zh-CN';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ uiToolbar: {
3
+ start: string;
4
+ insert: string;
5
+ formulas: string;
6
+ data: string;
7
+ view: string;
8
+ others: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ //# sourceMappingURL=zh-CN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wBASE"}
@@ -0,0 +1,21 @@
1
+ import type { IDisposable } from '@wendellhu/redi';
2
+ import { INotificationService } from '../notification/notification.service';
3
+ export interface IBeforeCloseService {
4
+ /**
5
+ * Provide a callback to check if the web page could be closed safely.
6
+ *
7
+ * @param callback The callback to check if the web page could be closed safely.
8
+ * It should return a string to show a message to the user. If the return value is undefined,
9
+ * the web page could be closed safely.
10
+ */
11
+ registerBeforeClose(callback: () => string | undefined): IDisposable;
12
+ }
13
+ export declare const IBeforeCloseService: import("@wendellhu/redi").IdentifierDecorator<IBeforeCloseService>;
14
+ export declare class DesktopBeforeCloseService implements IBeforeCloseService {
15
+ private readonly _notificationService;
16
+ private _callbacks;
17
+ constructor(_notificationService: INotificationService);
18
+ registerBeforeClose(callback: () => string | undefined): IDisposable;
19
+ private _init;
20
+ }
21
+ //# sourceMappingURL=before-close.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"before-close.service.d.ts","sourceRoot":"","sources":["../../../../src/services/before-close/before-close.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAChC;;;;;;OAMG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;CACxE;AAED,eAAO,MAAM,mBAAmB,oEAA0E,CAAC;AAE3G,qBAAa,yBAA0B,YAAW,mBAAmB;IAG/B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAFvE,OAAO,CAAC,UAAU,CAAuC;gBAEN,oBAAoB,EAAE,oBAAoB;IAI7F,mBAAmB,CAAC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,GAAG,WAAW;IASpE,OAAO,CAAC,KAAK;CAuBhB"}
@@ -0,0 +1,36 @@
1
+ import { Disposable } from '@univerjs/core';
2
+ export declare const PLAIN_TEXT_CLIPBOARD_MIME_TYPE = "text/plain";
3
+ export declare const HTML_CLIPBOARD_MIME_TYPE = "text/html";
4
+ /**
5
+ * This interface provides an interface to access system's clipboard.
6
+ */
7
+ export interface IClipboardInterfaceService {
8
+ /**
9
+ * Write plain text into clipboard. Use write() to write both plain text and html.
10
+ * @param text
11
+ */
12
+ writeText(text: string): Promise<void>;
13
+ /**
14
+ * Write both plain text and html into clipboard.
15
+ * @param text
16
+ * @param html
17
+ */
18
+ write(text: string, html: string): Promise<void>;
19
+ /**
20
+ * Read plain text from clipboard. Use read() to read both plain text and html.
21
+ * @returns plain text
22
+ */
23
+ readText(): Promise<string>;
24
+ /**
25
+ * Read `ClipboardItem[]` from clipboard.
26
+ */
27
+ read(): Promise<ClipboardItem[]>;
28
+ }
29
+ export declare const IClipboardInterfaceService: import("@wendellhu/redi").IdentifierDecorator<IClipboardInterfaceService>;
30
+ export declare class BrowserClipboardService extends Disposable implements IClipboardInterfaceService {
31
+ write(text: string, html: string): Promise<void>;
32
+ writeText(text: string): Promise<void>;
33
+ read(): Promise<ClipboardItem[]>;
34
+ readText(): Promise<string>;
35
+ }
36
+ //# sourceMappingURL=clipboard-interface.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-interface.service.d.ts","sourceRoot":"","sources":["../../../../src/services/clipboard/clipboard-interface.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,eAAO,MAAM,8BAA8B,eAAe,CAAC;AAC3D,eAAO,MAAM,wBAAwB,cAAc,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;;OAIG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;CAGpC;AAED,eAAO,MAAM,0BAA0B,2EAEtC,CAAC;AAEF,qBAAa,uBAAwB,SAAQ,UAAW,YAAW,0BAA0B;IACnF,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAchD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBtC,IAAI,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAIhC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CASpC"}
@@ -0,0 +1,5 @@
1
+ import type { IMultiCommand } from '@univerjs/core';
2
+ export declare const CopyCommand: IMultiCommand;
3
+ export declare const CutCommand: IMultiCommand;
4
+ export declare const PasteCommand: IMultiCommand;
5
+ //# sourceMappingURL=clipboard.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.command.d.ts","sourceRoot":"","sources":["../../../../src/services/clipboard/clipboard.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,eAAO,MAAM,WAAW,EAAE,aAQzB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,aAQxB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,aAQ1B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { IDisposable } from '@wendellhu/redi';
2
+ import { type Subject } from 'rxjs';
3
+ import { type IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
4
+ export declare const IConfirmService: import("@wendellhu/redi").IdentifierDecorator<IConfirmService>;
5
+ export interface IConfirmService {
6
+ open(params: IConfirmPartMethodOptions): IDisposable;
7
+ close(id: string): void;
8
+ getObservableConfirm(): Subject<IConfirmPartMethodOptions[]>;
9
+ }
10
+ //# sourceMappingURL=confirm.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm.service.d.ts","sourceRoot":"","sources":["../../../../src/services/confirm/confirm.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAE/F,eAAO,MAAM,eAAe,gEAA8D,CAAC;AAE3F,MAAM,WAAW,eAAe;IAC5B,IAAI,CAAC,MAAM,EAAE,yBAAyB,GAAG,WAAW,CAAC;IAErD,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,oBAAoB,IAAI,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAAC;CAChE"}
@@ -0,0 +1,12 @@
1
+ import type { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { type IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
4
+ import type { IConfirmService } from './confirm.service';
5
+ export declare class DesktopConfirmService implements IConfirmService {
6
+ private confirmOptions;
7
+ private readonly confirmOptions$;
8
+ open(option: IConfirmPartMethodOptions): IDisposable;
9
+ close(id: string): void;
10
+ getObservableConfirm(): Subject<IConfirmPartMethodOptions[]>;
11
+ }
12
+ //# sourceMappingURL=desktop-confirm.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desktop-confirm.service.d.ts","sourceRoot":"","sources":["../../../../src/services/confirm/desktop-confirm.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,qBAAa,qBAAsB,YAAW,eAAe;IACzD,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8C;IAE9E,IAAI,CAAC,MAAM,EAAE,yBAAyB,GAAG,WAAW;IAoBpD,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAQvB,oBAAoB;CAGvB"}
@@ -0,0 +1,18 @@
1
+ import { Disposable } from '@univerjs/core';
2
+ import type { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
3
+ import type { IDisposable } from '@wendellhu/redi';
4
+ export interface IContextMenuHandler {
5
+ /** A callback to open context menu with given position and menu type. */
6
+ handleContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
7
+ }
8
+ export interface IContextMenuService {
9
+ triggerContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
10
+ registerContextMenuHandler(handler: IContextMenuHandler): IDisposable;
11
+ }
12
+ export declare const IContextMenuService: import("@wendellhu/redi").IdentifierDecorator<IContextMenuService>;
13
+ export declare class DesktopContextMenuService extends Disposable implements IContextMenuService {
14
+ private _currentHandler;
15
+ triggerContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
16
+ registerContextMenuHandler(handler: IContextMenuHandler): IDisposable;
17
+ }
18
+ //# sourceMappingURL=contextmenu.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextmenu.service.d.ts","sourceRoot":"","sources":["../../../../src/services/contextmenu/contextmenu.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,WAAW,mBAAmB;IAChC,yEAAyE;IACzE,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACjF;AAED,MAAM,WAAW,mBAAmB;IAChC,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/E,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,WAAW,CAAC;CACzE;AAED,eAAO,MAAM,mBAAmB,oEAAuE,CAAC;AAExG,qBAAa,yBAA0B,SAAQ,UAAW,YAAW,mBAAmB;IACpF,OAAO,CAAC,eAAe,CAAoC;IAE3D,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAK9E,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,WAAW;CAWxE"}
@@ -0,0 +1,12 @@
1
+ import type { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { type IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
4
+ import type { IDialogService } from './dialog.service';
5
+ export declare class DesktopDialogService implements IDialogService {
6
+ private dialogOptions;
7
+ private readonly dialogOptions$;
8
+ open(option: IDialogPartMethodOptions): IDisposable;
9
+ close(id: string): void;
10
+ getObservableDialog(): Subject<IDialogPartMethodOptions[]>;
11
+ }
12
+ //# sourceMappingURL=desktop-dialog.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desktop-dialog.service.d.ts","sourceRoot":"","sources":["../../../../src/services/dialog/desktop-dialog.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,qBAAa,oBAAqB,YAAW,cAAc;IACvD,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;IAE5E,IAAI,CAAC,MAAM,EAAE,wBAAwB,GAAG,WAAW;IAqBnD,KAAK,CAAC,EAAE,EAAE,MAAM;IAQhB,mBAAmB;CAGtB"}
@@ -0,0 +1,10 @@
1
+ import type { IDisposable } from '@wendellhu/redi';
2
+ import { type Subject } from 'rxjs';
3
+ import { type IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
4
+ export declare const IDialogService: import("@wendellhu/redi").IdentifierDecorator<IDialogService>;
5
+ export interface IDialogService {
6
+ open(params: IDialogPartMethodOptions): IDisposable;
7
+ close(id: string): void;
8
+ getObservableDialog(): Subject<IDialogPartMethodOptions[]>;
9
+ }
10
+ //# sourceMappingURL=dialog.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../src/services/dialog/dialog.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAE7F,eAAO,MAAM,cAAc,+DAA4D,CAAC;AAExF,MAAM,WAAW,cAAc;IAC3B,IAAI,CAAC,MAAM,EAAE,wBAAwB,GAAG,WAAW,CAAC;IAEpD,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,mBAAmB,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;CAC9D"}
@@ -0,0 +1,22 @@
1
+ import type { ContextService } from '@univerjs/core';
2
+ import { Disposable } from '@univerjs/core';
3
+ /**
4
+ * FocusService manages focusing state of the Univer application instance.
5
+ */
6
+ export declare const IFocusService: import("@wendellhu/redi").IdentifierDecorator<IFocusService>;
7
+ export interface IFocusService {
8
+ readonly isFocused: boolean;
9
+ setContainerElement(container: HTMLElement): void;
10
+ }
11
+ export declare const FOCUSING_UNIVER = "FOCUSING_UNIVER";
12
+ export declare class DesktopFocusService extends Disposable implements IFocusService {
13
+ private readonly _contextService;
14
+ private _containerElement;
15
+ private _isUniverFocused;
16
+ get isFocused(): boolean;
17
+ constructor(_contextService: ContextService);
18
+ dispose(): void;
19
+ setContainerElement(container: HTMLElement): void;
20
+ private _initFocusListener;
21
+ }
22
+ //# sourceMappingURL=focus.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.service.d.ts","sourceRoot":"","sources":["../../../../src/services/focus/focus.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,UAAU,EAA+D,MAAM,gBAAgB,CAAC;AAKzG;;GAEG;AACH,eAAO,MAAM,aAAa,8DAA0D,CAAC;AAErF,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,qBACa,mBAAoB,SAAQ,UAAW,YAAW,aAAa;IAS3C,OAAO,CAAC,QAAQ,CAAC,eAAe;IAR7D,OAAO,CAAC,iBAAiB,CAA+B;IAExD,OAAO,CAAC,gBAAgB,CAAQ;IAEhC,IAAI,SAAS,IAAI,OAAO,CAEvB;gBAE6C,eAAe,EAAE,cAAc;IAOpE,OAAO,IAAI,IAAI;IAMxB,mBAAmB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;IAIjD,OAAO,CAAC,kBAAkB;CAuB7B"}
@@ -0,0 +1,11 @@
1
+ import type { ILocalStorageService } from '@univerjs/core';
2
+ export declare class DesktopLocalStorageService implements ILocalStorageService {
3
+ getItem<T>(key: string): Promise<T | null>;
4
+ setItem<T>(key: string, value: T): Promise<T>;
5
+ removeItem(key: string): Promise<void>;
6
+ clear(): Promise<void>;
7
+ key(index: number): Promise<string | null>;
8
+ keys(): Promise<string[]>;
9
+ iterate<T, U>(iteratee: (value: T, key: string, iterationNumber: number) => U): Promise<U>;
10
+ }
11
+ //# sourceMappingURL=local-storage.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-storage.service.d.ts","sourceRoot":"","sources":["../../../../src/services/local-storage/local-storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,qBAAa,0BAA2B,YAAW,oBAAoB;IACnE,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAI1C,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAI7C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI1C,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIzB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAG7F"}
@@ -0,0 +1,103 @@
1
+ import type { IAccessor } from '@wendellhu/redi';
2
+ import type { Observable } from 'rxjs';
3
+ export type OneOrMany<T> = T | T[];
4
+ export declare const enum MenuPosition {
5
+ VOID = "void",
6
+ TOOLBAR_START = "uiToolbar.start",
7
+ TOOLBAR_INSERT = "uiToolbar.insert",
8
+ TOOLBAR_FORMULAS = "uiToolbar.formulas",
9
+ TOOLBAR_DATA = "uiToolbar.data",
10
+ TOOLBAR_VIEW = "uiToolbar.view",
11
+ TOOLBAR_OTHERS = "uiToolbar.others",
12
+ CONTEXT_MENU = "contextMenu"
13
+ }
14
+ export declare const enum MenuGroup {
15
+ TOOLBAR_HISTORY = 0,
16
+ TOOLBAR_FORMAT = 1,
17
+ TOOLBAR_LAYOUT = 2,
18
+ TOOLBAR_FORMULAS_INSERT = 3,
19
+ TOOLBAR_FORMULAS_VIEW = 4,
20
+ TOOLBAR_FILE = 5,
21
+ TOOLBAR_OTHERS = 6,
22
+ CONTEXT_MENU_FORMAT = 7,
23
+ CONTEXT_MENU_LAYOUT = 8,
24
+ CONTEXT_MENU_DATA = 9,
25
+ CONTEXT_MENU_OTHERS = 10
26
+ }
27
+ export declare const enum MenuItemType {
28
+ /** Button style menu item. */
29
+ BUTTON = 0,
30
+ /** Menu item with submenus. Submenus could be other IMenuItem or an ID of a registered component. */
31
+ SELECTOR = 1,
32
+ /** Button style menu item with a dropdown menu. */
33
+ BUTTON_SELECTOR = 2,
34
+ /** Submenus have to specific features and do not invoke commands. */
35
+ SUBITEMS = 3
36
+ }
37
+ interface IMenuItemBase<V> {
38
+ /** ID of the menu item. Normally it should be the same as the ID of the command that it would invoke. */
39
+ id: string;
40
+ subId?: string;
41
+ title?: string;
42
+ description?: string;
43
+ icon?: string | Observable<string>;
44
+ tooltip?: string;
45
+ /** The group that the item belongs to. */
46
+ group?: MenuGroup;
47
+ /** In what menu should the item display. */
48
+ positions: OneOrMany<MenuPosition | string>;
49
+ /** @deprecated this type seems unnecessary */
50
+ type: MenuItemType;
51
+ /**
52
+ * Custom label component id.
53
+ * */
54
+ label?: string | {
55
+ name: string;
56
+ hoverable?: boolean;
57
+ props?: Record<string, string | number | Array<{
58
+ [x: string | number]: string;
59
+ }>>;
60
+ };
61
+ hidden$?: Observable<boolean>;
62
+ disabled$?: Observable<boolean>;
63
+ /** On observable value that should emit the value of the corresponding selection component. */
64
+ value$?: Observable<V>;
65
+ }
66
+ export interface IMenuButtonItem<V = undefined> extends IMenuItemBase<V> {
67
+ type: MenuItemType.BUTTON;
68
+ activated$?: Observable<boolean>;
69
+ }
70
+ export interface IValueOption<T = undefined> {
71
+ value?: string | number;
72
+ value$?: Observable<T>;
73
+ label?: string | {
74
+ name: string;
75
+ hoverable?: boolean;
76
+ props?: Record<string, string | number | Array<{
77
+ [x: string | number]: string;
78
+ }>>;
79
+ };
80
+ icon?: string;
81
+ tooltip?: string;
82
+ style?: object;
83
+ disabled?: boolean;
84
+ id?: string;
85
+ }
86
+ export interface ICustomComponentProps<T> {
87
+ value: T;
88
+ onChange: (v: T) => void;
89
+ }
90
+ export interface IMenuSelectorItem<V = MenuItemDefaultValueType, T = undefined> extends IMenuItemBase<V> {
91
+ type: MenuItemType.SELECTOR | MenuItemType.BUTTON_SELECTOR | MenuItemType.SUBITEMS;
92
+ /** Options or IDs of registered components. */
93
+ selections?: Array<IValueOption<T>> | Observable<Array<IValueOption<T>>>;
94
+ }
95
+ export declare function isMenuSelectorItem<T extends MenuItemDefaultValueType>(v: IMenuItem): v is IMenuSelectorItem<T>;
96
+ export type MenuItemDefaultValueType = string | number | undefined;
97
+ export type IMenuItem = IMenuButtonItem | IMenuSelectorItem<MenuItemDefaultValueType>;
98
+ export type IDisplayMenuItem<T extends IMenuItem> = T & {
99
+ shortcut?: string;
100
+ };
101
+ export type IMenuItemFactory = (accessor: IAccessor) => IMenuItem;
102
+ export {};
103
+ //# sourceMappingURL=menu.d.ts.map