diff --git a/packages/debugger/README.md b/packages-experimental/debugger/README.md similarity index 100% rename from packages/debugger/README.md rename to packages-experimental/debugger/README.md diff --git a/packages/debugger/package.json b/packages-experimental/debugger/package.json similarity index 100% rename from packages/debugger/package.json rename to packages-experimental/debugger/package.json diff --git a/packages/debugger/src/commands/commands/float-dom.command.ts b/packages-experimental/debugger/src/commands/commands/float-dom.command.ts similarity index 100% rename from packages/debugger/src/commands/commands/float-dom.command.ts rename to packages-experimental/debugger/src/commands/commands/float-dom.command.ts index a913949120e..e360e649ad7 100644 --- a/packages/debugger/src/commands/commands/float-dom.command.ts +++ b/packages-experimental/debugger/src/commands/commands/float-dom.command.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { ICommand } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui'; +import type { ICommand } from '@univerjs/core'; export const CreateFloatDomCommand: ICommand = { id: 'debugger.command.create-float-dom', diff --git a/packages/debugger/src/commands/commands/unit.command.ts b/packages-experimental/debugger/src/commands/commands/unit.command.ts similarity index 100% rename from packages/debugger/src/commands/commands/unit.command.ts rename to packages-experimental/debugger/src/commands/commands/unit.command.ts index ab27564b42d..e91ea037abd 100644 --- a/packages/debugger/src/commands/commands/unit.command.ts +++ b/packages-experimental/debugger/src/commands/commands/unit.command.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import type { ICommand, IWorkbookData, Univer, Workbook } from '@univerjs/core'; import { CommandType, IUniverInstanceService, UniverInstanceType } from '@univerjs/core'; -import type { FUniver } from '@univerjs/facade'; import { IFileOpenerService } from '@univerjs/ui'; +import type { ICommand, IWorkbookData, Univer, Workbook } from '@univerjs/core'; +import type { FUniver } from '@univerjs/facade'; declare global { // eslint-disable-next-line ts/naming-convention diff --git a/packages/debugger/src/commands/operations/cell.operation.ts b/packages-experimental/debugger/src/commands/operations/cell.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/cell.operation.ts rename to packages-experimental/debugger/src/commands/operations/cell.operation.ts diff --git a/packages/debugger/src/commands/operations/change-user.operation.ts b/packages-experimental/debugger/src/commands/operations/change-user.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/change-user.operation.ts rename to packages-experimental/debugger/src/commands/operations/change-user.operation.ts index 75fff119dd8..46feb4be70b 100644 --- a/packages/debugger/src/commands/operations/change-user.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/change-user.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand, Workbook } from '@univerjs/core'; import { CommandType, createDefaultUser, IPermissionService, IUniverInstanceService, UniverInstanceType, UserManagerService } from '@univerjs/core'; import { WorkbookManageCollaboratorPermission } from '@univerjs/sheets'; +import type { IAccessor, ICommand, Workbook } from '@univerjs/core'; export enum UnitRole { Reader = 0, diff --git a/packages/debugger/src/commands/operations/confirm.operation.ts b/packages-experimental/debugger/src/commands/operations/confirm.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/confirm.operation.ts rename to packages-experimental/debugger/src/commands/operations/confirm.operation.ts index 8708a8d8ab4..9a153bdbca3 100644 --- a/packages/debugger/src/commands/operations/confirm.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/confirm.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; import { IConfirmService } from '@univerjs/ui'; +import type { IAccessor, ICommand } from '@univerjs/core'; export interface IUIComponentCommandParams { value: string; diff --git a/packages/debugger/src/commands/operations/dialog.operation.ts b/packages-experimental/debugger/src/commands/operations/dialog.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/dialog.operation.ts rename to packages-experimental/debugger/src/commands/operations/dialog.operation.ts index c6ccf5b4691..dcc5168d4d1 100644 --- a/packages/debugger/src/commands/operations/dialog.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/dialog.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; import { IDialogService } from '@univerjs/ui'; +import type { IAccessor, ICommand } from '@univerjs/core'; export interface IUIComponentCommandParams { value: string; diff --git a/packages/debugger/src/commands/operations/locale.operation.ts b/packages-experimental/debugger/src/commands/operations/locale.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/locale.operation.ts rename to packages-experimental/debugger/src/commands/operations/locale.operation.ts index 1ae9b0d2d23..f355eb47671 100644 --- a/packages/debugger/src/commands/operations/locale.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/locale.operation.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import type { IAccessor, ICommand, LocaleType } from '@univerjs/core'; import { CommandType, LocaleService } from '@univerjs/core'; +import type { IAccessor, ICommand, LocaleType } from '@univerjs/core'; export interface ILocaleCommandParams { value: LocaleType; diff --git a/packages/debugger/src/commands/operations/message.operation.ts b/packages-experimental/debugger/src/commands/operations/message.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/message.operation.ts rename to packages-experimental/debugger/src/commands/operations/message.operation.ts index 5e181041891..67acb6aa299 100644 --- a/packages/debugger/src/commands/operations/message.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/message.operation.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; import { MessageType } from '@univerjs/design'; import { IMessageService } from '@univerjs/ui'; +import type { IAccessor, ICommand } from '@univerjs/core'; export const MessageOperation: ICommand = { id: 'debugger.operation.message', diff --git a/packages/debugger/src/commands/operations/notification.operation.ts b/packages-experimental/debugger/src/commands/operations/notification.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/notification.operation.ts rename to packages-experimental/debugger/src/commands/operations/notification.operation.ts index 9eeebbcdb18..1fb75df4764 100644 --- a/packages/debugger/src/commands/operations/notification.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/notification.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; import { INotificationService } from '@univerjs/ui'; +import type { IAccessor, ICommand } from '@univerjs/core'; export interface IUIComponentCommandParams { value: string; diff --git a/packages/debugger/src/commands/operations/numfmt.operations.ts b/packages-experimental/debugger/src/commands/operations/numfmt.operations.ts similarity index 100% rename from packages/debugger/src/commands/operations/numfmt.operations.ts rename to packages-experimental/debugger/src/commands/operations/numfmt.operations.ts index fd128f3c323..4c1b1d0a8dc 100644 --- a/packages/debugger/src/commands/operations/numfmt.operations.ts +++ b/packages-experimental/debugger/src/commands/operations/numfmt.operations.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType, ICommandService } from '@univerjs/core'; +import type { IAccessor, ICommand } from '@univerjs/core'; export interface INumfmtOperationCommandParams { value: 'close' | 'open'; diff --git a/packages/debugger/src/commands/operations/save-snapshot.operations.ts b/packages-experimental/debugger/src/commands/operations/save-snapshot.operations.ts similarity index 100% rename from packages/debugger/src/commands/operations/save-snapshot.operations.ts rename to packages-experimental/debugger/src/commands/operations/save-snapshot.operations.ts index 34da7f59826..71e48f9cf52 100644 --- a/packages/debugger/src/commands/operations/save-snapshot.operations.ts +++ b/packages-experimental/debugger/src/commands/operations/save-snapshot.operations.ts @@ -14,11 +14,11 @@ * limitations under the License. */ +import { CommandType, IResourceLoaderService, IUniverInstanceService, ObjectMatrix, UniverInstanceType } from '@univerjs/core'; /* eslint-disable node/prefer-global/process */ import type { DocumentDataModel, IAccessor, ICommand, IStyleData, IWorkbookData, Workbook } from '@univerjs/core'; -import { CommandType, IResourceLoaderService, IUniverInstanceService, ObjectMatrix, UniverInstanceType } from '@univerjs/core'; -import { RecordController } from '../../controllers/local-save/record.controller'; import { ExportController } from '../../controllers/local-save/export.controller'; +import { RecordController } from '../../controllers/local-save/record.controller'; export interface ISaveSnapshotParams { value: 'sheet' | 'workbook' | 'record'; diff --git a/packages/debugger/src/commands/operations/set.editable.operation.ts b/packages-experimental/debugger/src/commands/operations/set.editable.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/set.editable.operation.ts rename to packages-experimental/debugger/src/commands/operations/set.editable.operation.ts index 5a8379453a9..0108e67b17b 100644 --- a/packages/debugger/src/commands/operations/set.editable.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/set.editable.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand } from '@univerjs/core'; import { CommandType, IPermissionService, IUniverInstanceService } from '@univerjs/core'; import { getSheetCommandTarget, WorkbookEditablePermission, WorksheetEditPermission } from '@univerjs/sheets'; +import type { IAccessor, ICommand } from '@univerjs/core'; export interface ISetEditableCommandParams { value: 'sheet' | 'univer'; diff --git a/packages/debugger/src/commands/operations/sidebar.operation.ts b/packages-experimental/debugger/src/commands/operations/sidebar.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/sidebar.operation.ts rename to packages-experimental/debugger/src/commands/operations/sidebar.operation.ts index e835c2c6cb1..7634d51d6c0 100644 --- a/packages/debugger/src/commands/operations/sidebar.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/sidebar.operation.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IAccessor, ICommand, Workbook } from '@univerjs/core'; import { CommandType, IUniverInstanceService, UniverInstanceType } from '@univerjs/core'; import { IEditorService, ISidebarService } from '@univerjs/ui'; +import type { IAccessor, ICommand, Workbook } from '@univerjs/core'; import { TEST_EDITOR_CONTAINER_COMPONENT } from '../../views/test-editor/component-name'; export interface IUIComponentCommandParams { diff --git a/packages/debugger/src/commands/operations/theme.operation.ts b/packages-experimental/debugger/src/commands/operations/theme.operation.ts similarity index 100% rename from packages/debugger/src/commands/operations/theme.operation.ts rename to packages-experimental/debugger/src/commands/operations/theme.operation.ts index 8e80116bffc..339aae36cbf 100644 --- a/packages/debugger/src/commands/operations/theme.operation.ts +++ b/packages-experimental/debugger/src/commands/operations/theme.operation.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import type { IAccessor, ICommand, IStyleSheet } from '@univerjs/core'; import { CommandType, ThemeService } from '@univerjs/core'; +import type { IAccessor, ICommand, IStyleSheet } from '@univerjs/core'; export interface IThemeCommandParams { value?: IStyleSheet; diff --git a/packages/debugger/src/components/Image.tsx b/packages-experimental/debugger/src/components/Image.tsx similarity index 100% rename from packages/debugger/src/components/Image.tsx rename to packages-experimental/debugger/src/components/Image.tsx diff --git a/packages/debugger/src/components/VueI18nIcon.vue b/packages-experimental/debugger/src/components/VueI18nIcon.vue similarity index 100% rename from packages/debugger/src/components/VueI18nIcon.vue rename to packages-experimental/debugger/src/components/VueI18nIcon.vue diff --git a/packages/debugger/src/controllers/config.schema.ts b/packages-experimental/debugger/src/controllers/config.schema.ts similarity index 100% rename from packages/debugger/src/controllers/config.schema.ts rename to packages-experimental/debugger/src/controllers/config.schema.ts diff --git a/packages/debugger/src/controllers/debugger.controller.ts b/packages-experimental/debugger/src/controllers/debugger.controller.ts similarity index 100% rename from packages/debugger/src/controllers/debugger.controller.ts rename to packages-experimental/debugger/src/controllers/debugger.controller.ts index 3b7233e115d..9a68d376776 100644 --- a/packages/debugger/src/controllers/debugger.controller.ts +++ b/packages-experimental/debugger/src/controllers/debugger.controller.ts @@ -17,6 +17,10 @@ import { Disposable, ICommandService, Inject, Injector, LifecycleStages, OnLifecycle } from '@univerjs/core'; import { ComponentManager, IMenuManagerService } from '@univerjs/ui'; +import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; +import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; +import { ShowCellContentOperation } from '../commands/operations/cell.operation'; +import { ChangeUserCommand } from '../commands/operations/change-user.operation'; import { ConfirmOperation } from '../commands/operations/confirm.operation'; import { DialogOperation } from '../commands/operations/dialog.operation'; import { LocaleOperation } from '../commands/operations/locale.operation'; @@ -24,21 +28,17 @@ import { MessageOperation } from '../commands/operations/message.operation'; import { NotificationOperation } from '../commands/operations/notification.operation'; import { SaveSnapshotOptions } from '../commands/operations/save-snapshot.operations'; import { SetEditable } from '../commands/operations/set.editable.operation'; + import { SidebarOperation } from '../commands/operations/sidebar.operation'; -import { ThemeOperation } from '../commands/operations/theme.operation'; -import { TestEditorContainer } from '../views/test-editor/TestTextEditor'; -import { TEST_EDITOR_CONTAINER_COMPONENT } from '../views/test-editor/component-name'; +import { ThemeOperation } from '../commands/operations/theme.operation'; +import { ImageDemo } from '../components/Image'; // @ts-ignore import VueI18nIcon from '../components/VueI18nIcon.vue'; - -import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; -import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; -import { ImageDemo } from '../components/Image'; -import { ChangeUserCommand } from '../commands/operations/change-user.operation'; -import { ShowCellContentOperation } from '../commands/operations/cell.operation'; -import { RecordController } from './local-save/record.controller'; +import { TEST_EDITOR_CONTAINER_COMPONENT } from '../views/test-editor/component-name'; +import { TestEditorContainer } from '../views/test-editor/TestTextEditor'; import { ExportController } from './local-save/export.controller'; +import { RecordController } from './local-save/record.controller'; import { menuSchema } from './menu.schema'; @OnLifecycle(LifecycleStages.Ready, DebuggerController) diff --git a/packages/debugger/src/controllers/e2e/data/default-doc.ts b/packages-experimental/debugger/src/controllers/e2e/data/default-doc.ts similarity index 100% rename from packages/debugger/src/controllers/e2e/data/default-doc.ts rename to packages-experimental/debugger/src/controllers/e2e/data/default-doc.ts index 99eadc790af..8a081769960 100644 --- a/packages/debugger/src/controllers/e2e/data/default-doc.ts +++ b/packages-experimental/debugger/src/controllers/e2e/data/default-doc.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import type { IDocumentData } from '@univerjs/core'; import { BooleanNumber, DocumentFlavor } from '@univerjs/core'; import { ptToPixel } from '@univerjs/engine-render'; +import type { IDocumentData } from '@univerjs/core'; // eslint-disable-next-line max-lines-per-function export function getDefaultDocData(): IDocumentData { diff --git a/packages/debugger/src/controllers/e2e/data/default-sheet.ts b/packages-experimental/debugger/src/controllers/e2e/data/default-sheet.ts similarity index 100% rename from packages/debugger/src/controllers/e2e/data/default-sheet.ts rename to packages-experimental/debugger/src/controllers/e2e/data/default-sheet.ts index 3b62c07f713..ce9e5692b1f 100644 --- a/packages/debugger/src/controllers/e2e/data/default-sheet.ts +++ b/packages-experimental/debugger/src/controllers/e2e/data/default-sheet.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import type { IWorkbookData } from '@univerjs/core'; import { LocaleType } from '@univerjs/core'; +import type { IWorkbookData } from '@univerjs/core'; export function getDefaultWorkbookData(): IWorkbookData { const DEFAULT_WORKBOOK_DATA_DEMO = { diff --git a/packages/debugger/src/controllers/e2e/e2e-memory.controller.ts b/packages-experimental/debugger/src/controllers/e2e/e2e-memory.controller.ts similarity index 100% rename from packages/debugger/src/controllers/e2e/e2e-memory.controller.ts rename to packages-experimental/debugger/src/controllers/e2e/e2e-memory.controller.ts index c3e2396a814..38c88c25271 100644 --- a/packages/debugger/src/controllers/e2e/e2e-memory.controller.ts +++ b/packages-experimental/debugger/src/controllers/e2e/e2e-memory.controller.ts @@ -16,8 +16,8 @@ import { Disposable, ICommandService, IUniverInstanceService, LifecycleStages, OnLifecycle, UniverInstanceType } from '@univerjs/core'; import { DisposeUniverCommand } from '../../commands/commands/unit.command'; -import { getDefaultWorkbookData } from './data/default-sheet'; import { getDefaultDocData } from './data/default-doc'; +import { getDefaultWorkbookData } from './data/default-sheet'; const AWAIT_LOADING_TIMEOUT = 5000; const AWAIT_DISPOSING_TIMEOUT = 5000; diff --git a/packages/debugger/src/controllers/local-save/export.controller.ts b/packages-experimental/debugger/src/controllers/local-save/export.controller.ts similarity index 100% rename from packages/debugger/src/controllers/local-save/export.controller.ts rename to packages-experimental/debugger/src/controllers/local-save/export.controller.ts diff --git a/packages/debugger/src/controllers/local-save/record.controller.ts b/packages-experimental/debugger/src/controllers/local-save/record.controller.ts similarity index 98% rename from packages/debugger/src/controllers/local-save/record.controller.ts rename to packages-experimental/debugger/src/controllers/local-save/record.controller.ts index 4d659faa139..e028f7afb93 100644 --- a/packages/debugger/src/controllers/local-save/record.controller.ts +++ b/packages-experimental/debugger/src/controllers/local-save/record.controller.ts @@ -64,6 +64,7 @@ export class RecordController { ]); } catch (err) { console.error(`${commandInfo.id} unable to serialize`); + console.error(err); } }); return () => { diff --git a/packages/debugger/src/controllers/local-save/util.ts b/packages-experimental/debugger/src/controllers/local-save/util.ts similarity index 100% rename from packages/debugger/src/controllers/local-save/util.ts rename to packages-experimental/debugger/src/controllers/local-save/util.ts diff --git a/packages/debugger/src/controllers/menu.schema.ts b/packages-experimental/debugger/src/controllers/menu.schema.ts similarity index 100% rename from packages/debugger/src/controllers/menu.schema.ts rename to packages-experimental/debugger/src/controllers/menu.schema.ts index cd087c4d35d..d1f83e0fdde 100644 --- a/packages/debugger/src/controllers/menu.schema.ts +++ b/packages-experimental/debugger/src/controllers/menu.schema.ts @@ -15,7 +15,19 @@ */ import { type MenuSchemaType, RibbonOthersGroup } from '@univerjs/ui'; +import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; +import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; +import { ShowCellContentOperation } from '../commands/operations/cell.operation'; +import { ChangeUserCommand } from '../commands/operations/change-user.operation'; +import { ConfirmOperation } from '../commands/operations/confirm.operation'; +import { DialogOperation } from '../commands/operations/dialog.operation'; import { LocaleOperation } from '../commands/operations/locale.operation'; +import { MessageOperation } from '../commands/operations/message.operation'; +import { NotificationOperation } from '../commands/operations/notification.operation'; +import { SaveSnapshotOptions } from '../commands/operations/save-snapshot.operations'; +import { SetEditable } from '../commands/operations/set.editable.operation'; +import { SidebarOperation } from '../commands/operations/sidebar.operation'; +import { ThemeOperation } from '../commands/operations/theme.operation'; import { ChangeUserMenuItemFactory, ConfirmMenuItemFactory, @@ -38,18 +50,6 @@ import { UNIT_ITEM_MENU_ID, UnitMenuItemFactory, } from '../controllers/menu'; -import { ThemeOperation } from '../commands/operations/theme.operation'; -import { NotificationOperation } from '../commands/operations/notification.operation'; -import { ConfirmOperation } from '../commands/operations/confirm.operation'; -import { DialogOperation } from '../commands/operations/dialog.operation'; -import { MessageOperation } from '../commands/operations/message.operation'; -import { SaveSnapshotOptions } from '../commands/operations/save-snapshot.operations'; -import { SetEditable } from '../commands/operations/set.editable.operation'; -import { SidebarOperation } from '../commands/operations/sidebar.operation'; -import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; -import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; -import { ChangeUserCommand } from '../commands/operations/change-user.operation'; -import { ShowCellContentOperation } from '../commands/operations/cell.operation'; export const menuSchema: MenuSchemaType = { [RibbonOthersGroup.OTHERS]: { diff --git a/packages/debugger/src/controllers/menu.ts b/packages-experimental/debugger/src/controllers/menu.ts similarity index 100% rename from packages/debugger/src/controllers/menu.ts rename to packages-experimental/debugger/src/controllers/menu.ts index 30e3a808b44..dadc9461d5d 100644 --- a/packages/debugger/src/controllers/menu.ts +++ b/packages-experimental/debugger/src/controllers/menu.ts @@ -16,10 +16,14 @@ import { LocaleType } from '@univerjs/core'; import { defaultTheme, greenTheme } from '@univerjs/design'; -import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui'; import { MenuItemType } from '@univerjs/ui'; import type { IAccessor } from '@univerjs/core'; +import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui'; +import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; +import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; +import { ShowCellContentOperation } from '../commands/operations/cell.operation'; +import { ChangeUserCommand, UnitRole } from '../commands/operations/change-user.operation'; import { ConfirmOperation } from '../commands/operations/confirm.operation'; import { DialogOperation } from '../commands/operations/dialog.operation'; import { LocaleOperation } from '../commands/operations/locale.operation'; @@ -29,10 +33,6 @@ import { SaveSnapshotOptions } from '../commands/operations/save-snapshot.operat import { SetEditable } from '../commands/operations/set.editable.operation'; import { SidebarOperation } from '../commands/operations/sidebar.operation'; import { ThemeOperation } from '../commands/operations/theme.operation'; -import { CreateEmptySheetCommand, DisposeCurrentUnitCommand, DisposeUniverCommand, LoadSheetSnapshotCommand } from '../commands/commands/unit.command'; -import { CreateFloatDomCommand } from '../commands/commands/float-dom.command'; -import { ChangeUserCommand, UnitRole } from '../commands/operations/change-user.operation'; -import { ShowCellContentOperation } from '../commands/operations/cell.operation'; export function LocaleMenuItemFactory(accessor: IAccessor): IMenuSelectorItem { return { diff --git a/packages/debugger/src/controllers/performance-monitor.controller.ts b/packages-experimental/debugger/src/controllers/performance-monitor.controller.ts similarity index 100% rename from packages/debugger/src/controllers/performance-monitor.controller.ts rename to packages-experimental/debugger/src/controllers/performance-monitor.controller.ts index d4056547614..9818724bcff 100644 --- a/packages/debugger/src/controllers/performance-monitor.controller.ts +++ b/packages-experimental/debugger/src/controllers/performance-monitor.controller.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import type { Nullable } from '@univerjs/core'; import { Inject, IUniverInstanceService, LifecycleService, LifecycleStages, OnLifecycle, RxDisposable } from '@univerjs/core'; import { IRenderManagerService } from '@univerjs/engine-render'; -import type { Subscription } from 'rxjs'; import { distinctUntilChanged, filter, take, takeUntil } from 'rxjs'; +import type { Nullable } from '@univerjs/core'; +import type { Subscription } from 'rxjs'; @OnLifecycle(LifecycleStages.Rendered, PerformanceMonitorController) export class PerformanceMonitorController extends RxDisposable { diff --git a/packages/debugger/src/debugger-plugin.ts b/packages-experimental/debugger/src/debugger-plugin.ts similarity index 100% rename from packages/debugger/src/debugger-plugin.ts rename to packages-experimental/debugger/src/debugger-plugin.ts index 68353f18cd8..15ec28c5a5d 100644 --- a/packages/debugger/src/debugger-plugin.ts +++ b/packages-experimental/debugger/src/debugger-plugin.ts @@ -17,11 +17,11 @@ import { IConfigService, Inject, Injector, Plugin } from '@univerjs/core'; import type { Dependency } from '@univerjs/core'; +import { defaultPluginConfig, PLUGIN_CONFIG_KEY } from './controllers/config.schema'; import { DebuggerController } from './controllers/debugger.controller'; import { E2EMemoryController } from './controllers/e2e/e2e-memory.controller'; import { PerformanceMonitorController } from './controllers/performance-monitor.controller'; import type { IUniverDebuggerConfig } from './controllers/config.schema'; -import { defaultPluginConfig, PLUGIN_CONFIG_KEY } from './controllers/config.schema'; export class UniverDebuggerPlugin extends Plugin { static override pluginName = 'UNIVER_DEBUGGER_PLUGIN'; diff --git a/packages/debugger/src/index.ts b/packages-experimental/debugger/src/index.ts similarity index 100% rename from packages/debugger/src/index.ts rename to packages-experimental/debugger/src/index.ts diff --git a/packages-experimental/debugger/src/views/test-editor/TestTextEditor.tsx b/packages-experimental/debugger/src/views/test-editor/TestTextEditor.tsx new file mode 100644 index 00000000000..4d5b0eadece --- /dev/null +++ b/packages-experimental/debugger/src/views/test-editor/TestTextEditor.tsx @@ -0,0 +1,117 @@ +/** + * 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. + */ + +import { createInternalEditorID, IUniverInstanceService, UniverInstanceType, useDependency } from '@univerjs/core'; + +import { Input } from '@univerjs/design'; +import { RangeSelector, TextEditor } from '@univerjs/ui'; +import React, { useState } from 'react'; +import type { Workbook } from '@univerjs/core'; + +const editorStyle: React.CSSProperties = { + width: '100%', +}; + +/** + * Floating editor's container. + */ +export const TestEditorContainer = () => { + const univerInstanceService = useDependency(IUniverInstanceService); + const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)!; + if (workbook == null) { + return; + } + + const unitId = workbook.getUnitId(); + + const sheetId = workbook.getActiveSheet()?.getSheetId(); + + const [readonly, setReadonly] = useState(false); + + return ( +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ ); +}; diff --git a/packages/debugger/src/views/test-editor/component-name.ts b/packages-experimental/debugger/src/views/test-editor/component-name.ts similarity index 100% rename from packages/debugger/src/views/test-editor/component-name.ts rename to packages-experimental/debugger/src/views/test-editor/component-name.ts diff --git a/packages/debugger/src/vite-env.d.ts b/packages-experimental/debugger/src/vite-env.d.ts similarity index 100% rename from packages/debugger/src/vite-env.d.ts rename to packages-experimental/debugger/src/vite-env.d.ts diff --git a/packages/debugger/tsconfig.json b/packages-experimental/debugger/tsconfig.json similarity index 100% rename from packages/debugger/tsconfig.json rename to packages-experimental/debugger/tsconfig.json diff --git a/packages/debugger/tsconfig.node.json b/packages-experimental/debugger/tsconfig.node.json similarity index 100% rename from packages/debugger/tsconfig.node.json rename to packages-experimental/debugger/tsconfig.node.json diff --git a/packages/debugger/vite.config.ts b/packages-experimental/debugger/vite.config.ts similarity index 100% rename from packages/debugger/vite.config.ts rename to packages-experimental/debugger/vite.config.ts diff --git a/packages/debugger/src/views/test-editor/TestTextEditor.tsx b/packages/debugger/src/views/test-editor/TestTextEditor.tsx deleted file mode 100644 index 3d52aab3694..00000000000 --- a/packages/debugger/src/views/test-editor/TestTextEditor.tsx +++ /dev/null @@ -1,64 +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. - */ - -import React, { useState } from 'react'; - -import { RangeSelector, TextEditor } from '@univerjs/ui'; -import type { Workbook } from '@univerjs/core'; -import { createInternalEditorID, IUniverInstanceService, UniverInstanceType, useDependency } from '@univerjs/core'; -import { Input } from '@univerjs/design'; - -const editorStyle: React.CSSProperties = { - width: '100%', -}; - -/** - * Floating editor's container. - * @returns - */ -export const TestEditorContainer = () => { - const univerInstanceService = useDependency(IUniverInstanceService); - const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)!; - if (workbook == null) { - return; - } - - const unitId = workbook.getUnitId(); - - const sheetId = workbook.getActiveSheet()?.getSheetId(); - - const [readonly, setReadonly] = useState(false); - - return ( -
- -

- -

- -

- -

- -

- -

- -

- -
- ); -}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37d2a19ec34..2e559c6ab48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -203,7 +203,7 @@ importers: version: link:../packages/data-validation '@univerjs/debugger': specifier: workspace:* - version: link:../packages/debugger + version: link:../packages-experimental/debugger '@univerjs/design': specifier: workspace:* version: link:../packages/design @@ -401,6 +401,56 @@ importers: specifier: ^5.6.2 version: 5.6.2 + packages-experimental/debugger: + dependencies: + '@univerjs/core': + specifier: workspace:* + version: link:../../packages/core + '@univerjs/design': + specifier: workspace:* + version: link:../../packages/design + '@univerjs/engine-render': + specifier: workspace:* + version: link:../../packages/engine-render + '@univerjs/facade': + specifier: workspace:* + version: link:../../packages/facade + '@univerjs/sheets': + specifier: workspace:* + version: link:../../packages/sheets + '@univerjs/sheets-drawing-ui': + specifier: workspace:* + version: link:../../packages/sheets-drawing-ui + '@univerjs/ui': + specifier: workspace:* + version: link:../../packages/ui + react: + specifier: ^16.9.0 || ^17.0.0 || ^18.0.0 + version: 18.3.1 + optionalDependencies: + vue: + specifier: '>=3.0.0' + version: 3.4.38(typescript@5.6.2) + devDependencies: + '@univerjs-infra/shared': + specifier: workspace:* + version: link:../../common/shared + '@vitejs/plugin-vue': + specifier: ^5.1.3 + version: 5.1.3(vite@5.4.3(@types/node@22.5.4)(less@4.2.0)(sass@1.77.5)(terser@5.31.6))(vue@3.4.38(typescript@5.6.2)) + rxjs: + specifier: ^7.8.1 + version: 7.8.1 + typescript: + specifier: ^5.6.2 + version: 5.6.2 + vite: + specifier: ^5.4.3 + version: 5.4.3(@types/node@22.5.4)(less@4.2.0)(sass@1.77.5)(terser@5.31.6) + vitest: + specifier: ^2.0.5 + version: 2.0.5(@types/node@22.5.4)(happy-dom@15.0.0)(jsdom@24.1.1)(less@4.2.0)(sass@1.77.5)(terser@5.31.6) + packages-experimental/uni-docs-ui: dependencies: '@univerjs/core': @@ -805,56 +855,6 @@ importers: specifier: ^2.0.5 version: 2.0.5(@types/node@22.5.4)(happy-dom@15.0.0)(jsdom@24.1.1)(less@4.2.0)(sass@1.77.5)(terser@5.31.6) - packages/debugger: - dependencies: - '@univerjs/core': - specifier: workspace:* - version: link:../core - '@univerjs/design': - specifier: workspace:* - version: link:../design - '@univerjs/engine-render': - specifier: workspace:* - version: link:../engine-render - '@univerjs/facade': - specifier: workspace:* - version: link:../facade - '@univerjs/sheets': - specifier: workspace:* - version: link:../sheets - '@univerjs/sheets-drawing-ui': - specifier: workspace:* - version: link:../sheets-drawing-ui - '@univerjs/ui': - specifier: workspace:* - version: link:../ui - react: - specifier: ^16.9.0 || ^17.0.0 || ^18.0.0 - version: 18.3.1 - optionalDependencies: - vue: - specifier: '>=3.0.0' - version: 3.4.38(typescript@5.6.2) - devDependencies: - '@univerjs-infra/shared': - specifier: workspace:* - version: link:../../common/shared - '@vitejs/plugin-vue': - specifier: ^5.1.3 - version: 5.1.3(vite@5.4.3(@types/node@22.5.4)(less@4.2.0)(sass@1.77.5)(terser@5.31.6))(vue@3.4.38(typescript@5.6.2)) - rxjs: - specifier: ^7.8.1 - version: 7.8.1 - typescript: - specifier: ^5.6.2 - version: 5.6.2 - vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(less@4.2.0)(sass@1.77.5)(terser@5.31.6) - vitest: - specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(happy-dom@15.0.0)(jsdom@24.1.1)(less@4.2.0)(sass@1.77.5)(terser@5.31.6) - packages/design: dependencies: '@rc-component/color-picker':