1
0
mirror of synced 2026-03-25 04:28:34 +08:00

refactor: 将data-source,dep,schema,utils收敛到core,将form,table,stage,design,util收敛到editor

This commit is contained in:
roymondchen
2024-09-04 17:25:33 +08:00
committed by roymondchen
parent c3bc1035ad
commit 34fc0a15b9
212 changed files with 634 additions and 778 deletions

View File

@@ -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';

View File

@@ -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;

View File

@@ -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) => {