feat(stage): runtime添加getApp方法

This commit is contained in:
roymondchen 2022-05-27 18:45:02 +08:00 committed by jia000
parent 4a19017662
commit 0397c6887a
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,7 @@
},
"dependencies": {
"@scena/guides": "^0.17.0",
"@tmagic/core": "^1.0.0-rc.3",
"@tmagic/schema": "^1.0.0-rc.3",
"@tmagic/utils": "^1.0.0-rc.3",
"events": "^3.3.0",

View File

@ -18,6 +18,7 @@
import { MoveableOptions } from 'react-moveable/declaration/types';
import Core from '@tmagic/core';
import { Id, MApp, MNode } from '@tmagic/schema';
import { GuidesType } from './const';
@ -95,6 +96,7 @@ export interface RemoveData {
}
export interface Runtime {
getApp?: () => Core;
beforeSelect?: (el: HTMLElement) => Promise<boolean> | boolean;
getSnapElements?: (el?: HTMLElement) => HTMLElement[];
updateRootConfig: (config: MApp) => void;