@univerjs/ui 0.1.4 → 0.1.5

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 (84) hide show
  1. package/lib/cjs/index.js +13 -13
  2. package/lib/es/index.js +2934 -2908
  3. package/lib/index.css +1 -1
  4. package/lib/types/commands/operations/editor/set-editor-resize.operation.d.ts +2 -16
  5. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +2 -16
  6. package/lib/types/common/component-manager.d.ts +4 -18
  7. package/lib/types/common/lifecycle.d.ts +2 -16
  8. package/lib/types/common/menu-hidden-observable.d.ts +3 -17
  9. package/lib/types/components/custom-label/CustomLabel.d.ts +3 -18
  10. package/lib/types/components/editor/TextEditor.d.ts +4 -18
  11. package/lib/types/components/font-family/FontFamily.d.ts +3 -17
  12. package/lib/types/components/font-family/FontFamilyItem.d.ts +3 -17
  13. package/lib/types/components/font-family/interface.d.ts +2 -16
  14. package/lib/types/components/font-size/FontSize.d.ts +3 -17
  15. package/lib/types/components/font-size/interface.d.ts +3 -17
  16. package/lib/types/{views/components/popup/GlobalPopup.d.ts → components/hooks/__tests__/observable.spec.d.ts} +1 -2
  17. package/lib/types/components/hooks/locale.d.ts +1 -15
  18. package/lib/types/components/hooks/observable.d.ts +8 -19
  19. package/lib/types/components/menu/Menu.d.ts +3 -17
  20. package/lib/types/components/notification/Notification.d.ts +3 -17
  21. package/lib/types/components/notification/Notification.stories.d.ts +3 -17
  22. package/lib/types/components/range-selector/RangeSelector.d.ts +3 -17
  23. package/lib/types/controllers/error/error.controller.d.ts +2 -16
  24. package/lib/types/controllers/menus/menus.d.ts +3 -17
  25. package/lib/types/controllers/shared-shortcut.controller.d.ts +4 -19
  26. package/lib/types/controllers/shortcut-display/menu.d.ts +3 -17
  27. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +5 -19
  28. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +7 -24
  29. package/lib/types/controllers/ui/ui.controller.d.ts +1 -1
  30. package/lib/types/index.d.ts +1 -1
  31. package/lib/types/locale/en-US.d.ts +2 -16
  32. package/lib/types/locale/zh-CN.d.ts +1 -0
  33. package/lib/types/services/before-close/before-close.service.d.ts +3 -17
  34. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +3 -17
  35. package/lib/types/services/clipboard/clipboard.command.d.ts +2 -16
  36. package/lib/types/services/confirm/confirm.service.d.ts +5 -19
  37. package/lib/types/services/confirm/desktop-confirm.service.d.ts +4 -18
  38. package/lib/types/services/contextmenu/contextmenu.service.d.ts +4 -18
  39. package/lib/types/services/dialog/desktop-dialog.service.d.ts +5 -19
  40. package/lib/types/services/dialog/dialog.service.d.ts +5 -19
  41. package/lib/types/services/editor/editor.service.d.ts +8 -22
  42. package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +5 -19
  43. package/lib/types/services/global-zone/global-zone.service.d.ts +4 -18
  44. package/lib/types/services/layout/layout.service.d.ts +4 -19
  45. package/lib/types/services/local-storage/local-storage.service.d.ts +2 -16
  46. package/lib/types/services/menu/menu.d.ts +3 -17
  47. package/lib/types/services/menu/menu.service.d.ts +6 -20
  48. package/lib/types/services/message/desktop-message.service.d.ts +4 -19
  49. package/lib/types/services/message/message.service.d.ts +4 -18
  50. package/lib/types/services/notification/desktop-notification.service.d.ts +4 -18
  51. package/lib/types/services/notification/notification.service.d.ts +4 -18
  52. package/lib/types/services/platform/platform.service.d.ts +1 -1
  53. package/lib/types/services/popup/canvas-popup.service.d.ts +31 -0
  54. package/lib/types/services/range-selector/range-selector.service.d.ts +5 -20
  55. package/lib/types/services/shortcut/shortcut-panel.service.d.ts +2 -16
  56. package/lib/types/services/shortcut/shortcut.service.d.ts +6 -20
  57. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +4 -18
  58. package/lib/types/services/sidebar/sidebar.service.d.ts +5 -19
  59. package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +5 -19
  60. package/lib/types/services/zen-zone/zen-zone.service.d.ts +4 -18
  61. package/lib/types/ui-plugin.d.ts +3 -17
  62. package/lib/types/utils/cell.d.ts +2 -16
  63. package/lib/types/views/App.d.ts +3 -18
  64. package/lib/types/views/components/ComponentContainer.d.ts +2 -17
  65. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +2 -16
  66. package/lib/types/views/components/confirm-part/interface.d.ts +3 -17
  67. package/lib/types/views/components/context-menu/ContextMenu.d.ts +2 -16
  68. package/lib/types/views/components/dialog-part/DialogPart.d.ts +2 -16
  69. package/lib/types/views/components/dialog-part/interface.d.ts +3 -17
  70. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +2 -16
  71. package/lib/types/views/components/doc-bars/Toolbar.d.ts +2 -17
  72. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +3 -17
  73. package/lib/types/views/components/global-zone/GlobalZone.d.ts +2 -16
  74. package/lib/types/views/components/popup/CanvasPopup.d.ts +3 -0
  75. package/lib/types/views/components/popup/index.d.ts +1 -1
  76. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +2 -16
  77. package/lib/types/views/components/sidebar/Sidebar.d.ts +2 -16
  78. package/lib/types/views/components/sidebar/interface.d.ts +2 -16
  79. package/lib/types/views/components/zen-zone/ZenZone.d.ts +2 -16
  80. package/lib/types/views/hooks/active.d.ts +2 -16
  81. package/lib/types/views/parts.d.ts +2 -16
  82. package/lib/umd/index.js +13 -13
  83. package/package.json +17 -14
  84. package/lib/types/services/popup/global-popup-manager.service.d.ts +0 -45
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
17
- import type { INotificationMethodOptions } from '../../components/notification/Notification';
18
- import type { INotificationService } from './notification.service';
1
+ import { INotificationService } from './notification.service';
2
+ import { INotificationMethodOptions } from '../../components/notification/Notification';
3
+ import { IDisposable } from '@wendellhu/redi';
4
+
19
5
  export declare class DesktopNotificationService implements INotificationService {
20
6
  show(params: INotificationMethodOptions): IDisposable;
21
7
  }
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
17
- import type { INotificationMethodOptions } from '../../components/notification/Notification';
18
- export declare const INotificationService: import("@wendellhu/redi").IdentifierDecorator<INotificationService>;
1
+ import { INotificationMethodOptions } from '../../components/notification/Notification';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+
4
+ export declare const INotificationService: import('@wendellhu/redi').IdentifierDecorator<INotificationService>;
19
5
  export interface INotificationService {
20
6
  show(params: INotificationMethodOptions): IDisposable;
21
7
  }
@@ -21,7 +21,7 @@ export interface IPlatformService {
21
21
  readonly isWindows: boolean;
22
22
  readonly isLinux: boolean;
23
23
  }
24
- export declare const IPlatformService: import("@wendellhu/redi").IdentifierDecorator<IPlatformService>;
24
+ export declare const IPlatformService: import('@wendellhu/redi').IdentifierDecorator<IPlatformService>;
25
25
  export declare class DesktopPlatformService implements IPlatformService {
26
26
  get isMac(): boolean;
27
27
  get isWindows(): boolean;
@@ -0,0 +1,31 @@
1
+ import { Observable } from 'rxjs';
2
+ import { IBoundRectNoAngle } from '@univerjs/engine-render';
3
+
4
+ export interface IPopup {
5
+ anchorRect: IBoundRectNoAngle;
6
+ anchorRect$: Observable<IBoundRectNoAngle>;
7
+ componentKey: string;
8
+ onClickOutside?: (e: MouseEvent) => void;
9
+ unitId: string;
10
+ subUnitId: string;
11
+ direction?: 'vertical' | 'horizontal';
12
+ offset?: [number, number];
13
+ }
14
+ export interface ICanvasPopupService {
15
+ addPopup(item: IPopup): string;
16
+ removePopup(id: string): void;
17
+ removeAll(): void;
18
+ popups$: Observable<[string, IPopup][]>;
19
+ get popups(): [string, IPopup][];
20
+ }
21
+ export declare const ICanvasPopupService: import('@wendellhu/redi').IdentifierDecorator<ICanvasPopupService>;
22
+ export declare class CanvasPopupService implements ICanvasPopupService {
23
+ private _popupMap;
24
+ private _popups$;
25
+ popups$: Observable<[string, IPopup][]>;
26
+ get popups(): [string, IPopup][];
27
+ private _notice;
28
+ addPopup(item: IPopup): string;
29
+ removePopup(id: string): void;
30
+ removeAll(): void;
31
+ }
@@ -1,22 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IUnitRange, Nullable } from '@univerjs/core';
17
- import { Disposable } from '@univerjs/core';
18
- import type { IDisposable } from '@wendellhu/redi';
19
- import type { Observable } from 'rxjs';
1
+ import { Observable } from 'rxjs';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { IUnitRange, Nullable, Disposable } from '@univerjs/core';
4
+
20
5
  export interface IRangeSelectorRange extends IUnitRange {
21
6
  sheetName: string;
22
7
  }
@@ -39,4 +24,4 @@ export declare class RangeSelectorService extends Disposable implements IRangeSe
39
24
  selectionChange(range: IRangeSelectorRange[]): void;
40
25
  openSelector(): void;
41
26
  }
42
- export declare const IRangeSelectorService: import("@wendellhu/redi").IdentifierDecorator<IRangeSelectorService>;
27
+ export declare const IRangeSelectorService: import('@wendellhu/redi').IdentifierDecorator<IRangeSelectorService>;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  import { Disposable } from '@univerjs/core';
2
+
17
3
  export declare class ShortcutPanelService extends Disposable {
18
4
  private _open$;
19
- open$: import("rxjs").Observable<boolean>;
5
+ open$: import('rxjs').Observable<boolean>;
20
6
  get isOpen(): boolean;
21
7
  dispose(): void;
22
8
  open(): void;
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Disposable, ICommandService, IContextService } from '@univerjs/core';
17
- import type { IDisposable } from '@wendellhu/redi';
18
- import type { Observable } from 'rxjs';
19
- import { ILayoutService } from '../layout/layout.service';
20
1
  import { IPlatformService } from '../platform/platform.service';
2
+ import { ILayoutService } from '../layout/layout.service';
3
+ import { Observable } from 'rxjs';
4
+ import { IDisposable } from '@wendellhu/redi';
5
+ import { Disposable, ICommandService, IContextService } from '@univerjs/core';
6
+
21
7
  export interface IShortcutItem<P extends object = object> {
22
8
  /** This should reuse the corresponding command's id. */
23
9
  id: string;
@@ -49,7 +35,7 @@ export interface IShortcutService {
49
35
  getAllShortcuts(): IShortcutItem[];
50
36
  setDisable(disable: boolean): void;
51
37
  }
52
- export declare const IShortcutService: import("@wendellhu/redi").IdentifierDecorator<IShortcutService>;
38
+ export declare const IShortcutService: import('@wendellhu/redi').IdentifierDecorator<IShortcutService>;
53
39
  export declare class DesktopShortcutService extends Disposable implements IShortcutService {
54
40
  private readonly _commandService;
55
41
  private readonly _platformService;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
1
+ import { ISidebarService } from './sidebar.service';
2
+ import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
17
3
  import { Subject } from 'rxjs';
18
- import type { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
19
- import type { ISidebarService } from './sidebar.service';
4
+ import { IDisposable } from '@wendellhu/redi';
5
+
20
6
  export declare class DesktopSidebarService implements ISidebarService {
21
7
  private _sidebarOptions;
22
8
  readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
17
- import type { Subject } from 'rxjs';
18
- import type { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
19
- export declare const ISidebarService: import("@wendellhu/redi").IdentifierDecorator<ISidebarService>;
1
+ import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
2
+ import { Subject } from 'rxjs';
3
+ import { IDisposable } from '@wendellhu/redi';
4
+
5
+ export declare const ISidebarService: import('@wendellhu/redi').IdentifierDecorator<ISidebarService>;
20
6
  export interface ISidebarService {
21
7
  readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
22
8
  open(params: ISidebarMethodOptions): IDisposable;
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type IDisposable } from '@wendellhu/redi';
17
- import type { ForwardRefExoticComponent } from 'react';
18
- import { Subject } from 'rxjs';
1
+ import { IZenZoneService } from './zen-zone.service';
19
2
  import { ComponentManager } from '../../common/component-manager';
20
- import type { IZenZoneService } from './zen-zone.service';
3
+ import { Subject } from 'rxjs';
4
+ import { ForwardRefExoticComponent } from 'react';
5
+ import { IDisposable } from '@wendellhu/redi';
6
+
21
7
  export declare class DesktopZenZoneService implements IZenZoneService {
22
8
  private readonly _componentManager;
23
9
  readonly visible$: Subject<boolean>;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
17
- import type { Subject } from 'rxjs';
18
- export declare const IZenZoneService: import("@wendellhu/redi").IdentifierDecorator<IZenZoneService>;
1
+ import { Subject } from 'rxjs';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+
4
+ export declare const IZenZoneService: import('@wendellhu/redi').IdentifierDecorator<IZenZoneService>;
19
5
  export interface IZenZoneService {
20
6
  readonly visible$: Subject<boolean>;
21
7
  readonly componentKey$: Subject<string>;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { LocaleService, Plugin, PluginType } from '@univerjs/core';
1
+ import { IWorkbenchOptions } from './controllers/ui/ui.controller';
17
2
  import { Injector } from '@wendellhu/redi';
18
- import type { IWorkbenchOptions } from './controllers/ui/ui.controller';
3
+ import { LocaleService, Plugin, PluginType } from '@univerjs/core';
4
+
19
5
  export interface IUniverUIConfig extends IWorkbenchOptions {
20
6
  }
21
7
  /**
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentData, IRange, IStyleData } from '@univerjs/core';
1
+ import { IDocumentData, IRange, IStyleData } from '@univerjs/core';
2
+
17
3
  /**
18
4
  * The entire list of DOM spans is parsed into a rich-text JSON style sheet
19
5
  * @param $dom
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ComponentType } from 'react';
17
- import React from 'react';
18
- import type { IWorkbenchOptions } from '../controllers/ui/ui.controller';
1
+ import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
2
+ import { ComponentType, default as React } from 'react';
3
+
19
4
  export interface IUniverAppProps extends IWorkbenchOptions {
20
5
  mountContainer: HTMLElement;
21
6
  headerComponents?: Set<() => ComponentType>;
@@ -1,20 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ComponentType } from 'react';
17
- import React from 'react';
1
+ import { ComponentType, default as React } from 'react';
2
+
18
3
  export declare function ComponentContainer(props: {
19
4
  components?: Set<() => ComponentType>;
20
5
  }): React.ReactElement<{}, string | React.JSXElementConstructor<any>>[] | null;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  export declare function ConfirmPart(): React.JSX.Element[];
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IConfirmProps } from '@univerjs/design';
17
- import type { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
1
+ import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
2
+ import { IConfirmProps } from '@univerjs/design';
3
+
18
4
  export type IConfirmPartMethodOptions = {
19
5
  id: string;
20
6
  children?: ICustomLabelProps;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  export interface IProps {
18
4
  }
19
5
  export declare function ContextMenu(): React.JSX.Element;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  export declare function DialogPart(): React.JSX.Element;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDialogProps } from '@univerjs/design';
17
- import type { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
1
+ import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
2
+ import { IDialogProps } from '@univerjs/design';
3
+
18
4
  export type IDialogPartMethodOptions = {
19
5
  id: string;
20
6
  children?: ICustomLabelProps;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  export interface IBaseToolbarButtonProps {
18
4
  children?: React.ReactNode;
19
5
  /** Semantic DOM class */
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ComponentType } from 'react';
17
- import React from 'react';
18
1
  import { MenuPosition } from '../../../services/menu/menu';
2
+ import { ComponentType, default as React } from 'react';
3
+
19
4
  export declare const positions: MenuPosition[];
20
5
  export interface IToolbarProps {
21
6
  headerMenuComponents?: Set<() => ComponentType>;
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import type { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
1
+ import { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
2
+ import { default as React } from 'react';
3
+
18
4
  export declare const ToolbarItem: React.ForwardRefExoticComponent<IDisplayMenuItem<IMenuItem> & React.RefAttributes<any>>;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  export declare function GlobalZone(): React.JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare function CanvasPopup(): React.JSX.Element[];
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export { GlobalPopup } from './GlobalPopup';
16
+ export { CanvasPopup } from './CanvasPopup';
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
17
3
  /**
18
4
  * This component is responsible for rendering the shortcut panel on the desktop version of the app.
19
5
  */