@@ -16,7 +16,6 @@ import {
1616import {
1717 Skeleton as InnerSkeleton ,
1818} from '@alilc/lowcode-editor-skeleton' ;
19-
2019import {
2120 Hotkey ,
2221 Plugins ,
@@ -34,14 +33,8 @@ import {
3433 IPublicTypePluginMeta ,
3534} from '@alilc/lowcode-types' ;
3635import { getLogger } from '@alilc/lowcode-utils' ;
37- import { OutlinePlugin } from '@alilc/lowcode-plugin-outline-pane' ;
38- import { setterRegistry } from '../../engine/src/inner-plugins/setter-registry' ;
39- import { componentMetaParser } from '../../engine/src/inner-plugins/component-meta-parser' ;
40- import defaultPanelRegistry from '../../engine/src/inner-plugins/default-panel-registry' ;
41- import { builtinHotkey } from '../../engine/src/inner-plugins/builtin-hotkey' ;
36+ import { Workspace as InnerWorkspace } from './index' ;
4237import { EditorWindow } from './editor-window/context' ;
43- import { shellModelFactory } from './shell-model-factory' ;
44-
4538export class BasicContext {
4639 skeleton : Skeleton ;
4740 plugins : Plugins ;
@@ -62,7 +55,7 @@ export class BasicContext {
6255 innerPlugins : LowCodePluginManager ;
6356 canvas : Canvas ;
6457
65- constructor ( innerWorkspace : any , viewName : string , public editorWindow ?: EditorWindow ) {
58+ constructor ( innerWorkspace : InnerWorkspace , viewName : string , public editorWindow ?: EditorWindow ) {
6659 const editor = new Editor ( viewName , true ) ;
6760
6861 const innerSkeleton = new InnerSkeleton ( editor , viewName ) ;
@@ -71,7 +64,7 @@ export class BasicContext {
7164 const designer : Designer = new Designer ( {
7265 editor,
7366 viewName,
74- shellModelFactory,
67+ shellModelFactory : innerWorkspace . shellModelFactory ,
7568 } ) ;
7669 editor . set ( 'designer' as any , designer ) ;
7770
@@ -138,11 +131,7 @@ export class BasicContext {
138131
139132 // 注册一批内置插件
140133 this . registerInnerPlugins = async function registerPlugins ( ) {
141- await plugins . register ( OutlinePlugin , { } , { autoInit : true } ) ;
142- await plugins . register ( componentMetaParser ( designer ) ) ;
143- await plugins . register ( setterRegistry , { } , { autoInit : true } ) ;
144- await plugins . register ( defaultPanelRegistry ( editor , designer ) ) ;
145- await plugins . register ( builtinHotkey ) ;
134+ await innerWorkspace . registryInnerPlugin ( designer , editor , plugins ) ;
146135 } ;
147136 }
148137}
0 commit comments