Skip to content

Commit

Permalink
chore(debugger): move to packages-experimental folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Sep 10, 2024
1 parent f0fc942 commit 47e695c
Show file tree
Hide file tree
Showing 39 changed files with 217 additions and 163 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
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';
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class RecordController {
]);
} catch (err) {
console.error(`${commandInfo.id} unable to serialize`);
console.error(err);
}
});
return () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
File renamed without changes.
Loading

0 comments on commit 47e695c

Please sign in to comment.