refactor: 将data-source,dep,schema,utils收敛到core,将form,table,stage,design,util收敛到editor
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
import { useContext, useEffect, useState } from 'react';
|
||||
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import type { Id, MNodeInstance } from '@tmagic/schema';
|
||||
import { isDslNode } from '@tmagic/utils';
|
||||
import type { Id, MNodeInstance } from '@tmagic/core';
|
||||
import { isDslNode } from '@tmagic/core';
|
||||
|
||||
import AppContent from '../AppContent';
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
import TMagicApp from '@tmagic/core';
|
||||
import type { ChangeEvent } from '@tmagic/data-source';
|
||||
import type { MNode } from '@tmagic/schema';
|
||||
import { isPage, replaceChildNode } from '@tmagic/utils';
|
||||
import type { ChangeEvent, MNode } from '@tmagic/core';
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import { isPage, replaceChildNode } from '@tmagic/core';
|
||||
|
||||
export const useDsl = (app: TMagicApp | undefined) => {
|
||||
if (!app?.page) return null;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
import Core from '@tmagic/core';
|
||||
import type { Id, MApp } from '@tmagic/schema';
|
||||
import type { Id, MApp } from '@tmagic/core';
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import { getElById, replaceChildNode } from '@tmagic/core';
|
||||
import type { Magic, RemoveData, SortEventData, UpdateData } from '@tmagic/stage';
|
||||
import { getElById, replaceChildNode } from '@tmagic/utils';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@@ -11,7 +11,7 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export const useEditorDsl = (app: Core | undefined, renderDom: () => void) => {
|
||||
export const useEditorDsl = (app: TMagicApp | undefined, renderDom: () => void) => {
|
||||
let curPageId: Id = '';
|
||||
|
||||
const updateConfig = (root: MApp) => {
|
||||
|
||||
Reference in New Issue
Block a user