Skip to content

Commit

Permalink
chore(ui): add exports from ui (#2283)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhudev committed May 24, 2024
1 parent 2e9de45 commit 471edc4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/controllers/ui/ui-desktop.controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -72,7 +72,7 @@ export class DesktopUIController extends Disposable {
}
}

function bootStrap(
function bootstrap(
injector: Injector,
options: IWorkbenchOptions,
callback: (canvasEl: HTMLElement, containerElement: HTMLElement) => void
Expand Down
13 changes: 10 additions & 3 deletions packages/ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,28 @@ 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';
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';

// #endregion
2 changes: 1 addition & 1 deletion packages/ui/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 0 additions & 2 deletions packages/ui/src/views/components/context-menu/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down
17 changes: 0 additions & 17 deletions packages/ui/src/views/components/popup/index.ts

This file was deleted.

0 comments on commit 471edc4

Please sign in to comment.