diff --git a/packages/chakra-ui-lib/src/components/Table/TableTd.tsx b/packages/chakra-ui-lib/src/components/Table/TableTd.tsx index 5ab5abf6..a025e5e8 100644 --- a/packages/chakra-ui-lib/src/components/Table/TableTd.tsx +++ b/packages/chakra-ui-lib/src/components/Table/TableTd.tsx @@ -1,5 +1,9 @@ import React from 'react'; -import { RuntimeApplication, RuntimeComponentSchema } from '@sunmao-ui/core'; +import { + RuntimeApplication, + RuntimeComponentSchema, + PropsBeforeEvaled, +} from '@sunmao-ui/core'; import { Static } from '@sinclair/typebox'; import { ColumnSpec, ColumnsPropertySpec } from './TableTypes'; import { Button, Link, Td, Text } from '@chakra-ui/react'; @@ -11,7 +15,6 @@ import { ExpressionError, ImplWrapper, } from '@sunmao-ui/runtime'; -import { PropsBeforeEvaled } from '@sunmao-ui/shared'; export const TableTd: React.FC<{ index: number; diff --git a/packages/core/package.json b/packages/core/package.json index d24b4814..3f1407df 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -35,7 +35,6 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@sunmao-ui/shared": "^0.2.0", "@swc/core": "^1.2.121", "@types/jest": "^26.0.23", "@types/json-schema": "^7.0.7", diff --git a/packages/core/src/application.ts b/packages/core/src/application.ts index 8efd14d2..2ea42379 100644 --- a/packages/core/src/application.ts +++ b/packages/core/src/application.ts @@ -1,6 +1,6 @@ import { Metadata } from './metadata'; import { parseVersion, Version } from './version'; -import { type PropsBeforeEvaled } from '@sunmao-ui/shared'; +import { type PropsBeforeEvaled } from './schema'; // spec export type Application = { diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 1f655561..efa3b6e8 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -7,3 +7,4 @@ export * from './module'; export * from './version'; export * from './slot'; export * from './utilMethod'; +export * from './schema'; diff --git a/packages/shared/src/types/schema.ts b/packages/core/src/schema.ts similarity index 100% rename from packages/shared/src/types/schema.ts rename to packages/core/src/schema.ts diff --git a/packages/runtime/src/components/_internal/ModuleRenderer.tsx b/packages/runtime/src/components/_internal/ModuleRenderer.tsx index 642f8c48..18124584 100644 --- a/packages/runtime/src/components/_internal/ModuleRenderer.tsx +++ b/packages/runtime/src/components/_internal/ModuleRenderer.tsx @@ -7,11 +7,12 @@ import { parseType, RuntimeApplication, RuntimeComponentSchema, + PropsAfterEvaled, } from '@sunmao-ui/core'; import { ImplWrapper } from './ImplWrapper'; import { watch } from '../../utils/watchReactivity'; import { ImplementedRuntimeModule, UIServices } from '../../types'; -import { EventHandlerSpec, ModuleRenderSpec, PropsAfterEvaled } from '@sunmao-ui/shared'; +import { EventHandlerSpec, ModuleRenderSpec } from '@sunmao-ui/shared'; import { resolveChildrenMap } from '../../utils/resolveChildrenMap'; import { initStateAndMethod } from '../../utils/initStateAndMethod'; import { ExpressionError } from '../../services/StateManager'; diff --git a/packages/runtime/src/services/StateManager.ts b/packages/runtime/src/services/StateManager.ts index c792ac31..e7160564 100644 --- a/packages/runtime/src/services/StateManager.ts +++ b/packages/runtime/src/services/StateManager.ts @@ -13,8 +13,8 @@ import { consoleError, ConsoleType, ExpChunk, - PropsAfterEvaled, } from '@sunmao-ui/shared'; +import { type PropsAfterEvaled } from '@sunmao-ui/core'; dayjs.extend(relativeTime); dayjs.extend(isLeapYear); diff --git a/packages/runtime/src/traits/core/Event.tsx b/packages/runtime/src/traits/core/Event.tsx index 33fca33b..04e08be3 100644 --- a/packages/runtime/src/traits/core/Event.tsx +++ b/packages/runtime/src/traits/core/Event.tsx @@ -7,8 +7,8 @@ import { EventCallBackHandlerSpec, CORE_VERSION, CoreTraitName, - PropsBeforeEvaled, } from '@sunmao-ui/shared'; +import { type PropsBeforeEvaled } from '@sunmao-ui/core'; const HandlersSpec = Type.Array(EventHandlerSpec); const CallbackSpec = Type.Array(EventCallBackHandlerSpec); diff --git a/packages/runtime/src/types/index.ts b/packages/runtime/src/types/index.ts index 16c1fb46..b640809c 100644 --- a/packages/runtime/src/types/index.ts +++ b/packages/runtime/src/types/index.ts @@ -3,3 +3,4 @@ export * from './component'; export * from './trait'; export * from './module'; export * from './utilMethod'; +export * from './spec'; diff --git a/packages/shared/src/types/spec.ts b/packages/runtime/src/types/spec.ts similarity index 86% rename from packages/shared/src/types/spec.ts rename to packages/runtime/src/types/spec.ts index ffdd481b..ba4eb3a5 100644 --- a/packages/shared/src/types/spec.ts +++ b/packages/runtime/src/types/spec.ts @@ -1,4 +1,4 @@ -import { Condition } from './condition'; +import { Condition } from '@sunmao-ui/shared'; declare module '@sinclair/typebox' { export interface CustomOptions { diff --git a/packages/shared/src/types/index.ts b/packages/shared/src/types/index.ts index 65d13430..5cb12fe8 100644 --- a/packages/shared/src/types/index.ts +++ b/packages/shared/src/types/index.ts @@ -1,3 +1 @@ -export * from './spec'; export * from './condition'; -export * from './schema';