@@ -2,6 +2,7 @@ import { Editor } from '@alilc/lowcode-editor-core';
22import {
33 Skeleton as InnerSkeleton ,
44} from '@alilc/lowcode-editor-skeleton' ;
5+ import { IPublicResourceOptions } from '@alilc/lowcode-types' ;
56import { EditorWindow } from './editor-window/context' ;
67import { Resource } from './resource' ;
78
@@ -35,7 +36,7 @@ export class Workspace {
3536
3637 private resources : Map < string , Resource > = new Map ( ) ;
3738
38- registerResourceType ( resourceName : string , resourceType : 'editor' | 'webview' , options : ResourceOptions ) : void {
39+ registerResourceType ( resourceName : string , resourceType : 'editor' | 'webview' , options : IPublicResourceOptions ) : void {
3940 if ( resourceType === 'editor' ) {
4041 const resource = new Resource ( options ) ;
4142 this . resources . set ( resourceName , resource ) ;
@@ -62,23 +63,3 @@ export class Workspace {
6263
6364 openEditorWindow ( ) { }
6465}
65-
66- export interface ResourceOptions {
67- description : string ;
68- defaultViewType ?: string ;
69- editorViews ?: EditorViewOptions [ ] ;
70- init : ( ctx : any ) => Promise < void > ;
71- dispose : ( ctx : any ) => Promise < void > ;
72- import : ( ctx : any ) => Promise < any > ;
73- save : ( value : any ) => Promise < any > ;
74- }
75-
76- export interface ViewFunctions {
77- init : ( ) => Promise < void > ;
78- save : ( ) => Promise < void > ;
79- }
80-
81- export type EditorViewOptions = {
82- viewName : string ;
83- ( ctx : any ) : ViewFunctions ;
84- } ;
0 commit comments