Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore(ui): add exports from ui (#2283)
Wenzhao Hu471edc4da683
diff --git a/packages/ui/src/controllers/ui/ui-desktop.controller.tsx b/packages/ui/src/controllers/ui/ui-desktop.controller.tsxindex f8572fd7f0..e49dc93ba3 100644--- a/packages/ui/src/controllers/ui/ui-desktop.controller.tsx+++ b/packages/ui/src/controllers/ui/ui-desktop.controller.tsx@@ -42,7 +42,7 @@ export class DesktopUIController extends Disposable {bootstrapWorkbench(options: IWorkbenchOptions): void {this.disposeWithMe(- bootStrap(this._injector, options, (canvasElement, containerElement) => {+ bootstrap(this._injector, options, (canvasElement, containerElement) => {if (this._layoutService) {this.disposeWithMe(this._layoutService.registerRootContainerElement(containerElement));this.disposeWithMe(this._layoutService.registerCanvasElement(canvasElement as HTMLCanvasElement));@@ -72,7 +72,7 @@ export class DesktopUIController extends Disposable {}}-function bootStrap(+function bootstrap(injector: Injector,options: IWorkbenchOptions,callback: (canvasEl: HTMLElement, containerElement: HTMLElement) => voiddiff --git a/packages/ui/src/index.ts b/packages/ui/src/index.tsindex 6346c40b4d..541f75edff 100644--- a/packages/ui/src/index.ts+++ b/packages/ui/src/index.ts@@ -78,10 +78,10 @@ export { DesktopShortcutService, type IShortcutItem, IShortcutService } from './export { DesktopSidebarService } from './services/sidebar/desktop-sidebar.service';export { ISidebarService } from './services/sidebar/sidebar.service';export { IZenZoneService } from './services/zen-zone/zen-zone.service';-export { ZenZone } from './views/components/zen-zone/ZenZone';export { UniverUIPlugin, DISABLE_AUTO_FOCUS_KEY } from './ui-plugin';export * from './utils';export { type IConfirmPartMethodOptions } from './views/components/confirm-part/interface';+export { ComponentContainer } from './views/components/ComponentContainer';export { IEditorService, EditorService } from './services/editor/editor.service';export { TextEditor } from './components/editor/TextEditor';export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';@@ -89,10 +89,17 @@ export { RangeSelector } from './components/range-selector/RangeSelector';export { IRangeSelectorService } from './services/range-selector/range-selector.service';export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';export { CanvasPopupService, ICanvasPopupService, type IPopup } from './services/popup/canvas-popup.service';-export { ContextMenu } from './views/components/context-menu/ContextMenu';-export { CanvasPopup } from './views/components/popup/CanvasPopup';export { ProgressBar } from './components/progress-bar/ProgressBar';export { type IMenuGroup, useToolbarGroups, useToolbarItemStatus, useToolbarCollapseObserver } from './views/components/doc-bars/hook';export { mergeMenuConfigs } from './common/menu-merge-configs';export { IProgressService, ProgressService } from './services/progress/progress.service';export type { IProgressStep } from './services/progress/progress.service';++// #region - workbench components++export { ContextMenu } from './views/components/context-menu/ContextMenu';+export { Sidebar } from './views/components/sidebar/Sidebar';+export { ZenZone } from './views/components/zen-zone/ZenZone';+export { CanvasPopup } from './views/components/popup/CanvasPopup';++// #endregiondiff --git a/packages/ui/src/views/App.tsx b/packages/ui/src/views/App.tsxindex 732d04e24d..9915d8096f 100644--- a/packages/ui/src/views/App.tsx+++ b/packages/ui/src/views/App.tsx@@ -27,7 +27,7 @@ import { ComponentContainer } from './components/ComponentContainer';import { Toolbar } from './components/doc-bars/Toolbar';import { Sidebar } from './components/sidebar/Sidebar';import { ZenZone } from './components/zen-zone/ZenZone';-import { CanvasPopup } from './components/popup';+import { CanvasPopup } from './components/popup/CanvasPopup';import { builtInGlobalComponents } from './parts';import { ContextMenu } from './components/context-menu/ContextMenu';diff --git a/packages/ui/src/views/components/context-menu/ContextMenu.tsx b/packages/ui/src/views/components/context-menu/ContextMenu.tsxindex 7d4b652b68..0d163e160b 100644--- a/packages/ui/src/views/components/context-menu/ContextMenu.tsx+++ b/packages/ui/src/views/components/context-menu/ContextMenu.tsx@@ -24,8 +24,6 @@ import React, { useEffect, useState } from 'react';import { Menu } from '../../../components/menu/Menu';import { IContextMenuService } from '../../../services/contextmenu/contextmenu.service';-export interface IProps {}-export function ContextMenu() {const [visible, setVisible] = useState(false);const [menuType, setMenuType] = useState('');diff --git a/packages/ui/src/views/components/popup/index.ts b/packages/ui/src/views/components/popup/index.tsdeleted file mode 100644index 186cabf35d..0000000000--- a/packages/ui/src/views/components/popup/index.ts+++ /dev/null@@ -1,17 +0,0 @@-/**- * Copyright 2023-present DreamNum Inc.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--export { CanvasPopup } from './CanvasPopup';